Skip to content

Instantly share code, notes, and snippets.

@ProvoK
Last active March 18, 2019 16:34
Show Gist options
  • Save ProvoK/2f5d554136bae33e156416de2bd9a65b to your computer and use it in GitHub Desktop.
Save ProvoK/2f5d554136bae33e156416de2bd9a65b to your computer and use it in GitHub Desktop.
Git Utils
# 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