Last active
March 18, 2019 16:34
-
-
Save ProvoK/2f5d554136bae33e156416de2bd9a65b to your computer and use it in GitHub Desktop.
Git Utils
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
# Clean all local tags and fetch from remote | |
git tag | xargs -n 1 -I% git tag -d % && git fetch | |
# Remove from history deleted files. For wrongly committed BIG files that makes repository heavy | |
# Reference https://superuser.com/questions/1191186/remove-large-file-from-several-commits-ago-in-git | |
git filter-branch --tree-filter 'rm -f <filepath>' HEAD |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment