直接删除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
相关推荐
Alex6630282 小时前
我重写了 Hermes Agent,专门修掉了它的 4 个硬伤
github
考虑考虑3 小时前
git中的tag
git·gitlab·github
小墨同学boy4 小时前
WorkBuddy零基础教程进阶篇
人工智能·github·aigc
BerrySen1784 小时前
GitHub开源项目破圈方法论:从技术自嗨到生态共赢
开源·github
JavaGuide21 小时前
一个神级 PR Review Agent 诞生了:读 diff、写总结、找风险全自动!
github·ai编程
逛逛GitHub1 天前
1.3 万人点赞的 GitHub 项目,让 AI Agent 操作 Office 文件。
github
OpenTiny社区1 天前
Skill 设计:封装、评测、运营,一次讲透
前端·github
本地化文档1 天前
xlwings-docs-l10n
python·github·excel·gitcode·sphinx
徐小夕1 天前
倒腾2天,我开源了一款AI驱动的实时 3D CAD / 参数化建模工作台
前端·架构·github