如何从Git存储库中删除文件? - How can I delete a file from a Git repository?

08/06 01:00
阅读数 45

问题:

I have added a file named "file1.txt" to a Git repository. 我已将名为"file1.txt"的文件添加到Git存储库中。 After that, I committed it, added a couple of directories called dir1 and dir2 , and committed them to the Git repository. 之后,我提交了它,添加了几个名为dir1dir2的目录,并将它们提交给Git存储库。

Now the current repository has "file1.txt" , dir1 , and dir2 . 现在,当前存储库具有"file1.txt"dir1dir2 How can I delete "file1.txt" without affecting others, like dir1 and dir2 ? 如何在不影响其他内容的情况下删除"file1.txt" ,例如dir1dir2


解决方案:

参考一: https://stackoom.com/question/8add/如何从Git存储库中删除文件
参考二: https://oldbug.net/q/8add/How-can-I-delete-a-file-from-a-Git-repository
展开阅读全文
git
打赏
0
0 收藏
分享
加载中
更多评论
打赏
0 评论
0 收藏
0
分享
在线直播报名
返回顶部
顶部