Created
April 10, 2011 23:54
-
-
Save MichaelBlume/912865 to your computer and use it in GitHub Desktop.
Script for orphaning a single commit. Useful in conjunction with .git/info/grafts
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
git filter-branch -f --parent-filter ' | |
if [ "$GIT_COMMIT" = "SHA_GOES_HERE" ]; | |
then | |
echo '' | |
else | |
read parents; | |
echo $parents; | |
fi' -- --all |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment