Git: Undo last commit Undo the most recent git commit. This resets the branch back to its state before the commit. You can use this to run additional git commands or edit the commit before checking it in again.