Undo Git Add and Git Commit

Nick West (韋羲)
1 min readJan 22, 2018

--

  1. git reset --soft HEAD^ (undo git commit)
  2. git reset (undo git add)

Step 1, reset --soft HEAD^ , undoes git commit and brings you back to your git stage post- git add.

Step 2, reset , undoes git add , bringing you back to your git status before this add-everything debacle.

Happy coding!

--

--