这是我上一篇文章here的后续内容。 我正在尝试删除我提交给git的大文件。根据上一篇文章中的建议,我尝试了
git filter-branch --force --index-filter "git rm --cached --ignore-unmatch folder/Unconfirmed 866711.crdownload" --prune-empty --tag-name-filter cat -- --all
按照上述命令,我尝试推送所有更改
git push origin --force --all
但是,在使用filter-branch
之前,我得到了与显示的相同的错误
remote: error: File folder/Unconfirmed 866711.crdownload is 486.30 MB; this exceeds GitHub's file size limit of 100.00 MB
或者,我也尝试过
git add --all
git filter-branch -f --index-filter "git rm --cached --ignore-unmatch folder/Unconfirmed 866711.crdownload" HEAD
但是,我得到以下内容
Cannot rewrite branches: Your index contains uncommitted changes.
我不确定是否错过任何命令或标志。有什么建议吗?