Skip to content

Instantly share code, notes, and snippets.

@fokosun
Created December 20, 2015 20:26
Show Gist options
  • Save fokosun/cff5aa2046e330ae4bd8 to your computer and use it in GitHub Desktop.
Save fokosun/cff5aa2046e330ae4bd8 to your computer and use it in GitHub Desktop.
If your commit is not the most recent one
git rebase -- interactive $parent_of_flawed_commit
An editor will come up, with a list of all commits since the one you gave. Change the commit anyway you like now:
git commit --amend
git rebase --continue
git rebase --interactive lets you correct commits no matter how long ago they were.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment