Last active
September 18, 2019 17:08
-
-
Save selfup/0e4a47045d0b5bb49209e67c031db02c to your computer and use it in GitHub Desktop.
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 branch -r | grep -v /HEAD | |
for remote in `git branch -r | grep -v /HEAD`; do; git checkout --track $remote; done | |
git checkout master | |
git filter-branch --index-filter 'git rm -rf --cached --ignore-unmatch my_dir/' --prune-empty --tag-name-filter cat -- --all | |
git for-each-ref --format="%(refname)" refs/original/ | xargs -n 1 git update-ref -d | |
rm -Rf .git/logs .git/refs/original | |
git gc --prune=all --aggressive | |
git push origin --all --force | |
git push origin --tags --force |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment