美文网首页
Git 删除提交的历史记录

Git 删除提交的历史记录

作者: 终南山下007 | 来源:发表于2020-04-18 09:35 被阅读0次
git filter-branch -f --prune-empty --index-filter \
"git rm -rf --cached --ignore-unmatch *test.go" \
--tag-name-filter cat  -- --all

git reflog expire --verbose --expire=0 --all
git gc --prune=0

git push -f origin master

--index-filter 过滤需要删除的记录

相关文章

网友评论

      本文标题:Git 删除提交的历史记录

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