push报错提示:
1.根据上图提示,使用git命令:
$ git rev-list --objects --all | grep 779553bb45cd0b2911c6d53e62efa4298b62c08f
779553bb45cd0b2911c6d53e62efa4298b62c08f cloud-api-common/src/test/java/com/ckq/demo/soft/otp_win64_25.0.4.exe
2.删除大文件
$ git filter-branch --force --index-filter 'git rm -rf --cached --ignore-unmatch cloud-api-common/src/test/java/com/ckq/demo/soft/otp_win64_25.0.4.exe' --prune-empty --tag-name-filter cat -- --all
WARNING: git-filter-branch has a glut of gotchas generating mangled history
rewrites. Hit Ctrl-C before proceeding to abort, then use an
alternative filtering tool such as 'git filter-repo'
(https://github.com/newren/git-filter-repo/) instead. See the
filter-branch manual page for more details; to squelch this warning,
set FILTER_BRANCH_SQUELCH_WARNING=1.
Proceeding with filter-branch...
Rewrite 72970ad27a9de455f353f62cbd908c45666d2834 (23/48) (67 seconds passed, remaining 72 predicted) rm 'cloud-api-common/src/test/java/com/ckq/demo/soft/otp_win64_25.0.4.exe'
Rewrite 1a6718eb05677ca1fa71cf1074a60edc642484a4 (24/48) (72 seconds passed, remaining 72 predicted) rm 'cloud-api-common/src/test/java/com/ckq/demo/soft/otp_win64_25.0.4.exe'
Rewrite 645f78347093f7d71f296ac695eeaf4545476f85 (25/48) (73 seconds passed, remaining 67 predicted) rm 'cloud-api-common/src/test/java/com/ckq/demo/soft/otp_win64_25.0.4.exe'
Rewrite 7ba518f712d5ce2549868ef88902d100b589468e (48/48) (143 seconds passed, remaining 0 predicted)
Ref 'refs/heads/master' was rewritten
Ref 'refs/remotes/origin/master' was rewritten
3.强制push
$ git push origin master --force
4.清理
rm -rf .git/refs/original/
git reflog expire --expire=now --all
git gc --prune=now