问题:
I have a Git repo that I have deleted four files from using rm
( not git rm
), and my Git status looks like this: 我有一个Git repo,我已经删除了使用rm
( 而不是 git rm
)的四个文件,我的Git状态如下所示:
# deleted: file1.txt
# deleted: file2.txt
# deleted: file3.txt
# deleted: file4.txt
How do I remove these files from Git without having to manually go through and add each file like this: 如何从Git中删除这些文件,而无需手动浏览并添加如下所示的每个文件:
git rm file1 file2 file3 file4
Ideally, I'm looking for something that works in the same way that git add .
理想情况下,我正在寻找与git add .
相同的方式git add .
does, if that's possible. 如果那是可能的话。
解决方案:
参考一: https://stackoom.com/question/248U/从已从磁盘中删除的Git存储库中删除多个文件参考二: https://oldbug.net/q/248U/Removing-multiple-files-from-a-Git-repo-that-have-already-been-deleted-from-disk
来源:oschina
链接:https://my.oschina.net/stackoom/blog/4486031