直接删除Github上的文件

直接删除Github上的文件

说明:此操作只删除Github上的文件,本地仓库文件不受影响

1.确定要删除哪个分支文件,以删除main为例,

1.找到本地仓库位置以StudyNote为例,右键 bash here

2.打开命令窗口,将Github的StudyNote文件全部拉取到本地仓库

css 复制代码
git pull origin main

3.若不是main主分支,使用checkout切换

css 复制代码
git checkout 目标分支名

4.查看拉取项目所有文件夹

css 复制代码
dir

5.要删除main主分支的Issue.md文件,切换到其所在为止Auto_test/Python/Issue.md

6.删除tIssue.md文件

css 复制代码
git rm -r --cached target  

7.删除文件后提交

css 复制代码
 git commit -m '删除Issue.md'        # 提交,添加操作说明

8.查看该文件是否删除

css 复制代码
dir

9.将远程仓库文件推送

css 复制代码
git push
相关推荐
DeepAgent7 分钟前
AI Agent 开发实战(13):GitHub 开源
开源·github·agent
Jul1en_1 小时前
Matt 与 Uncle Bob 的播客访谈有感
开发语言·经验分享·笔记·ai·开源·github·ai编程
hrx-@@2 小时前
DSH 插件开发到上架:完整实操手册
人工智能·语言模型·开源·github
一条泥憨鱼2 小时前
【从0开始学习计算机网络】| 邮件协议入门:SMTP、POP3、IMAP
linux·运维·计算机网络·github
lpfasd1234 小时前
2026年第36周GitHub趋势周报:Agent技能化、MCP工具化与AI工程化加速
人工智能·github
OpenTiny社区16 小时前
【直播分享】GenUI SDK 技术公开课第二讲 | GenuiChat 核心配置深度解析
前端·github
dong_junshuai16 小时前
每天一个开源项目#93 HyperFrames:4.69万星的 HTML 视频渲染框架
开源·html·github
峰向AI17 小时前
别再忍受杂乱的桌面了,这款窗口管理器让 Windows 也有平铺式操作
github
cnnews19 小时前
Ubuntu 编译 postmarketOS
linux·运维·arm开发·ubuntu·github·音视频
逛逛GitHub21 小时前
把最新开源的 2B 端侧模型接入 DeepSeek Harness,有点子神奇。
github