Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Script for orphaning a single commit. Useful in conjunction with .git/info/grafts
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
You can’t perform that action at this time.