美文网首页
Git: 从历史提交中删除文件或文件夹

Git: 从历史提交中删除文件或文件夹

作者: 靳兆鲁 | 来源:发表于2021-08-02 20:36 被阅读0次

从历史提交中删除文件

git filter-branch --force --index-filter "git rm --cached --ignore-unmatch 你的文件的完整名称" --prune-empty --tag-name-filter cat -- --all

从历史提交中删除文件夹

git filter-branch --force --index-filter "git rm -r --cached --ignore-unmatch 你的文件夹的完整名称" --prune-empty --tag-name-filter cat -- --all

相关文章

网友评论

      本文标题:Git: 从历史提交中删除文件或文件夹

      本文链接:https://www.haomeiwen.com/subject/xmbjvltx.html