Last active
February 16, 2017 17:59
-
-
Save neilk/e00b56d6fdfbbfa41c9505ddccd70d2c to your computer and use it in GitHub Desktop.
Purge a file from your git repo
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 | |
git filter-branch --force --index-filter \ | |
"git rm -r --cached --ignore-unmatch $1" \ | |
--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