Created
April 13, 2012 21:09
-
-
Save HansCz/2380212 to your computer and use it in GitHub Desktop.
Git (Bash) - Filter branch
This file contains 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
# Ref.: http://stackoverflow.com/a/359759/173679 | |
git remote rm origin | |
git tag -l | xargs git tag -d | |
git filter-branch --tag-name-filter cat --prune-empty --subdirectory-filter ABC HEAD | |
git reset --hard | |
git for-each-ref --format="%(refname)" refs/original/ | xargs -n 1 git update-ref -d | |
git reflog expire --expire=now --all | |
git gc --aggressive --prune=now |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment