|
|
|
|
|
by ww520
4408 days ago
|
|
Can you elaborate what the command is? I would be really happy to learn about it. I know the complicate way to do it. Just want an easier way to do it, rather than multiple steps. Here are the steps I know of to get rid of big blobs. Long and complicate. Is there a better way? - Find out size of the big blobs and their HASH.
git verify-pack -v .git\objects\pack\pack-HASH.idx | sort -k3n
- Find out the name of a blob hash to verify the blob is the one to delete.
git ls-tree -r HEAD | grep HASH
git ls-tree -r COMMIT_HASH | grep HASH
git log --all --raw --no-abbrev | grep HASH
- Expire all working reflog now, and then prune deleted blob
git reflog expire --expire=all
git gc --prune=now
- Remove a blob.
git push -force
git filter-branch --index-filter 'git rm --cached *.zip --ignore-unmatch ' HEAD
git filter-branch --index-filter 'git rm --cached *.zip --ignore-unmatch ' --prune-empty -- --all
git filter-branch --index-filter 'git update-index --remove webapp.zip' <introduction-revision-sha1>..HEAD
git filter-branch --index-filter 'git update-index --remove webapp.zip' HASH..HEAD
- Clean up reflogs.
rm -Rf .git/refs/original
git reflog expire --expire=now --all
git gc --aggressive
git prune
|
|