git 常用命令操作
1. 上传大文件(>100M)后,不能push到远程,删掉大文件也不可以。用以下方法逐条运行可以处理:
报错1:this exceeds file size limit of 100.0 MB
报错2:remote: error: hook declined to update refs/heads/master
git filter-branch --force --index-filter "git rm --cached --ignore-unmatch XXX/XXX/XXX/data2.cab" --prune-empty --tag-name-filter cat -- --all
或者
git filter-branch -f --index-filter "git rm -rf --cached --ignore-unmatch **_02/images/hb.psd**" -- --all
git commit --amend -CHEAD
git push origin master