Last active
November 27, 2017 20:42
-
-
Save camsaul/52fe1576cd751e7a0a60 to your computer and use it in GitHub Desktop.
Git remove binary files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| git filter-branch --force --prune-empty --index-filter "git rm -rf --cached --ignore-unmatch *.elc" HEAD && git push --force |
Author
Author
Get the size of a Git repo:
git count-objects --verbose --human-readable
Author
Delete (remote) tags, which might be holding on to the files:
#Delete local tags.
git tag -l | xargs git tag -d
#Fetch remote tags.
git fetch
#Delete remote tags.
git tag -l | xargs git push --delete origin
#Delete local tasg.
git tag -l | xargs git tag -d
Author
Might want to disable signing when doing filter-branch or otherwise it will mess up commit messages
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add
--prune-emptyoption to remove empty commits as well