直接删除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
相关推荐
量子位34 分钟前
字节版龙虾架构火爆GitHub!开源获35k+ Star,内置Skill全家桶,原生适配飞书
github·ai编程
汪海游龙5 小时前
开源项目 Trending AI 招募 Google Play 内测人员(12 名)
android·github
HealthScience5 小时前
github怎么授权ssh(私人库授权)
运维·ssh·github
CoderJia程序员甲6 小时前
GitHub 热榜项目 - 日榜(2026-03-22)
人工智能·ai·大模型·github·ai教程
阿里嘎多学长6 小时前
2026-03-22 GitHub 热点项目精选
开发语言·程序员·github·代码托管
研究点啥好呢7 小时前
3月22日GitHub热门项目推荐|网页浏览,何须手动
人工智能·python·开源·github
darkb1rd8 小时前
ClawTeam:让 AI 代理组成集群,实现全自动化工作流
开源·github·好物分享
scilwb8 小时前
《TIAGo Dual 机器人 Isaac Sim (PhysX Lidar) + Cartographer 2D SLAM 严谨配置全流程指南》
github
scilwb8 小时前
Tiago Dual 机器人四视角 ROS 2 联合仿真完整配置教程
github