Skip to content

Instantly share code, notes, and snippets.

@kyrose
Created September 18, 2019 21:22
Show Gist options
  • Save kyrose/8fa37557e7cc93b8f462e001bdeaea15 to your computer and use it in GitHub Desktop.
Save kyrose/8fa37557e7cc93b8f462e001bdeaea15 to your computer and use it in GitHub Desktop.
Undoing a commit
$ git commit -m "Something dumb" # (1)
$ git reset HEAD~ # (2)
# edit or add files # (3)
$ git add ... # (4)
$ git commit -c ORIG_HEAD # (5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment