Skip to content

Latest commit

 

History

History
24 lines (16 loc) · 1.67 KB

resetting-to-a-commit-in-github-desktop.md

File metadata and controls

24 lines (16 loc) · 1.67 KB
title shortTitle intro versions
Resetting to a commit in GitHub Desktop
Resetting to a commit
You can reset to any commit up to the one that was last pushed to the remote branch.
feature
desktop

About resetting to a commit

If you made a series of commits and want to fix a mistake you made prior to the most recent commit, you can use "reset to commit" in {% data variables.product.prodname_desktop %} to reset the changes in those commits. Resetting to a commit restores the changes in the subsequent commits to your working directory and resets the branch to the selected commit. You can then make changes before committing again, or you can discard changes that you don't want to keep. For more information, see "AUTOTITLE."

You can reset to commit up to the most recent commit that has already been pushed to the remote repository. To undo a pushed commit without disrupting the 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."

Resetting to a commit

{% data reusables.desktop.history-tab %}

  1. Right-click on the commit you would like to reset to and select Reset to commit.

Further reading