Git 删除提交的历史记录
2020-04-18 本文已影响0人
终南山下007
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 过滤需要删除的记录