1.6 KiB
title | shortTitle | intro | versions | ||
---|---|---|---|---|---|
Undoing a commit in GitHub Desktop | Undoing a commit | You can undo a commit before you have pushed it to the remote branch. |
|
About undoing a commit
If you made a mistake in your changes, you can undo a commit in {% data variables.product.prodname_desktop %}. Undoing a commit restores the changes in the commit to your working directory and resets the branch to the previous commit, so you can make further changes before committing again.
You can undo multiple sequential commits up to a commit that has already been pushed to the remote repository by selecting a previous commit and using the "reset to commit" option. For more information, see "AUTOTITLE." To undo a pushed commit without disrupting commit history for other contributors, you can revert the commit. For more information, see "AUTOTITLE."
If you want to edit your most recent commit message, or combine new changes with your most recent commit, you can amend a commit. For more information, see "AUTOTITLE."