Skip to content

Instantly share code, notes, and snippets.

@mwleinad
Created March 20, 2020 17:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mwleinad/e2a9af8ceae80eb4449feac06980e9b3 to your computer and use it in GitHub Desktop.
Save mwleinad/e2a9af8ceae80eb4449feac06980e9b3 to your computer and use it in GitHub Desktop.
Remove last commit from git
$ git commit -m "Something terribly misguided" # (1)
$ git reset HEAD~ # (2)
<< edit files as necessary >> # (3)
$ git add ... # (4)
$ git commit -c ORIG_HEAD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment