Created
September 18, 2019 21:22
-
-
Save kyrose/8fa37557e7cc93b8f462e001bdeaea15 to your computer and use it in GitHub Desktop.
Undoing a commit
This file contains 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 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