Created
September 16, 2016 22:37
-
-
Save pestilence669/c6aa2b18067db7687ae6cf059b372d94 to your computer and use it in GitHub Desktop.
p4 obliterate (for Git)
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
#!/bin/bash | |
# | |
# run from the project's root with the full relative path to the file | |
# to destroy from history. | |
# | |
git filter-branch --force --index-filter \ | |
"git rm --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