Last active
September 6, 2017 19:38
-
-
Save Gnappuraz/b66b5559c70fca346e232dc5671dff1c to your computer and use it in GitHub Desktop.
Git filter-branch
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
| Here's a good way to clean the repo up after filter-branch: | |
| git remote rm origin | |
| rm -rf .git/refs/original/ .git/refs/remotes/ .git/*_HEAD .git/logs/ | |
| git for-each-ref --format="%(refname)" refs/original/ | xargs -n1 --no-run-if-empty git update-ref -d | |
| And then: | |
| git -c gc.reflogExpire=0 -c gc.reflogExpireUnreachable=0 -c gc.rerereresolved=0 \ | |
| -c gc.rerereunresolved=0 -c gc.pruneExpire=now gc "$@" --aggressive |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment