鍍金池/ 問答/Linux/ 關(guān)于git刪除大文件的問題,怎么刪不干凈。。

關(guān)于git刪除大文件的問題,怎么刪不干凈。。

clipboard.png
錯誤如圖所示有一個大文件.tags超了git上傳100m限制,按照提示執(zhí)行rm --cached .tags, git commit --amend -CHEAD,然后執(zhí)行g(shù)it push依然這個問題。最后rm 本地的.tags 還是不行。。求下幫助。。

回答
編輯回答
糖豆豆

遍歷刪除commit提交版本里面的 aaa/aaa.txt 文件
git filter-branch --index-filter 'git rm --cached --ignore-unmatch aaa/aaa.txt' HEAD

2018年3月12日 18:54