Last active
March 8, 2016 04:07
-
-
Save umamiMike/1de92e420085df5f1337 to your computer and use it in GitHub Desktop.
Remove a file from git history
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
!#/bin/bash | |
#will remove the file and all traces of it from your git history. | |
# Good for removing the accidental large bin file | |
# or maybe some sensitive data you accidentally committed | |
git filter-branch --force --index-filter 'git rm --cached --ignore-unmatch THEFILENAME HERE' --prune-empty --tag-name-filter cat -- --all |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment