且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何从 Git 历史记录中删除文件?

更新时间:2023-12-04 20:23:16

我找到了这个答案,它有帮助:

I have found this answer and it helped:

git filter-branch --index-filter "git rm -rf --cached --ignore-unmatch path_to_file" HEAD

在这里找到它https://myopswork.com/how-remove-files-completely-from-git-repository-history-47ed3e0c4c35