PingdeMBP:yii2cms_ios pinghe$ git verify-pack -v .git/objects/pack/pack-*.idx | sort -k 3 -g | tail -3
a96649b02f825f4a864cd34f894343c906e7839a blob 375067726 366238260 1372408552
296ea7e648f6b4c6168a11377ebdb34341b34b08 blob 375067730 366238897 3569835313
f38d8a5437a7750d3bb61d2b9dbebf4f199b1343 blob 375067730 366238871 2471124518
PingdeMBP:yii2cms_ios pinghe$ git rev-list --objects --all | grep a96649b02f825f4a864cd34f894343c906e7839a
结果:a96649b02f825f4a864cd34f894343c906e7839a frontend/web/apk/ppr004.apk
PingdeMBP:yii2cms_ios pinghe$ git filter-branch --index-filter 'git rm --cached --ignore-unmatch frontend/web/apk/ppr004.apk'
PingdeMBP:yii2cms_ios pinghe$ rm -rf .git/refs/original
PingdeMBP:yii2cms_ios pinghe$ git reflog expire --expire=now --all
PingdeMBP:yii2cms_ios pinghe$ git fsck --full --unreachable
PingdeMBP:yii2cms_ios pinghe$ git repack -A -d
PingdeMBP:yii2cms_ios pinghe$ git gc --aggressive --prune=now
PingdeMBP:yii2cms_ios pinghe$ git push --force
网友评论