Skip to content

Instantly share code, notes, and snippets.

@olavmrk
Last active August 29, 2015 13:57
Show Gist options
  • Save olavmrk/9383905 to your computer and use it in GitHub Desktop.
Save olavmrk/9383905 to your computer and use it in GitHub Desktop.
Remove all parents from commit
# Remove parent of commit 9c747fd659803ab7406b55fe38f752a03b9157d3
git filter-branch --parent-filter 'test $GIT_COMMIT = "9c747fd659803ab7406b55fe38f752a03b9157d3" || cat' HEAD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment