Skip to content

Commit

Permalink
Merge pull request #33224 from github/repo-sync
Browse files Browse the repository at this point in the history
Repo sync
  • Loading branch information
docs-bot authored May 29, 2024
2 parents 2278dd6 + 724228f commit 613ed1a
Show file tree
Hide file tree
Showing 14 changed files with 34 additions and 7 deletions.
Binary file modified assets/images/help/desktop/diff-selection.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/help/desktop/discard-multiple-lines.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/help/desktop/discard-single-line.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/help/desktop/mac-select-preferences-pane.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/help/desktop/partial-commit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/help/desktop/viewing-changes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/help/desktop/window-select-options-pane.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion content/desktop/managing-commits/index.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
---
title: Managing commits
intro: 'You can use {% data variables.product.prodname_desktop %} to amend, cherry-pick, reorder, revert, and squash commits.'
intro: 'You can use {% data variables.product.prodname_desktop %} to amend, cherry-pick, reorder, revert, reset, and squash commits.'
versions:
feature: desktop
children:
- /options-for-managing-commits-in-github-desktop
- /undoing-a-commit-in-github-desktop
- /resetting-to-a-commit-in-github-desktop
- /amending-a-commit-in-github-desktop
- /reverting-a-commit-in-github-desktop
- /cherry-picking-a-commit-in-github-desktop
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Often, it is difficult to follow these best practices perfectly at the point whe
| Option | Description | More information |
| ------ | ----------- | ---------------- |
| Undo a commit | Restores the changes from a commit to your working directory, so you can make further changes before re-committing. Useful if you made a mistake in the changes you included. Not possible if you have already pushed the commit to the remote repository. | "[AUTOTITLE](/desktop/managing-commits/undoing-a-commit-in-github-desktop)" |
| Reset to commit | Similar to undoing a commit, but restores the changes from all of the commits up to the selected commit to your working directory. Can only be used up to the most recent commit that has been pushed to the remote repository. | "[AUTOTITLE](/desktop/managing-commits/resetting-to-a-commit-in-github-desktop)" |
| Amend a commit | Lets you edit your most recent commit message or combine new changes with the most recent commit. Useful if the changes in the previous commit are still valid, but you have made further changes that fit into the same commit. | "[AUTOTITLE](/desktop/managing-commits/amending-a-commit-in-github-desktop)" |
| Revert a commit | Creates a new commit that reverses the changes of another commit in your history. Useful if a commit has already been pushed to the remote repository, and you don't want to remove the commit from the repository's history. | "[AUTOTITLE](/desktop/managing-commits/reverting-a-commit-in-github-desktop)" |
| Cherry-pick a commit | Copies a commit from one branch to another. Useful if you have accidentally committed changes on the wrong branch, or if you need to apply a bug fix across different branches you're working on. | "[AUTOTITLE](/desktop/managing-commits/cherry-picking-a-commit-in-github-desktop)" |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
title: Resetting to a commit in GitHub Desktop
shortTitle: Resetting to a commit
intro: 'You can reset to any commit up to the one that was last pushed to the remote branch.'
versions:
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](/desktop/making-changes-in-a-branch/committing-and-reviewing-changes-to-your-project-in-github-desktop)."

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](/desktop/managing-commits/reverting-a-commit-in-github-desktop)."

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](/desktop/managing-commits/amending-a-commit-in-github-desktop)."

## 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

- [Git Tools - Reset Demystified](https://git-scm.com/book/en/v2/Git-Tools-Reset-Demystified) in the Git documentation
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ versions:

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, until you reach a commit that has already been pushed to the remote repository. To undo a pushed commit without disrupting commit history for other contributors, you can revert the commit. For more information, see "[AUTOTITLE](/desktop/managing-commits/reverting-a-commit-in-github-desktop)."
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](/desktop/managing-commits/resetting-to-a-commit-in-github-desktop)." To undo a pushed commit without disrupting commit history for other contributors, you can revert the commit. For more information, see "[AUTOTITLE](/desktop/managing-commits/reverting-a-commit-in-github-desktop)."

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](/desktop/managing-commits/amending-a-commit-in-github-desktop)."

Expand Down
1 change: 1 addition & 0 deletions data/reusables/desktop/preferences-options-tabs.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ You can choose from the following options.
- Choose **Appearance** to switch between the light or dark theme.
- Choose **Prompts** to enable or disable confirmation dialogs before performing destructive actions.
- Choose **Advanced** for more configuration options.
- Choose **Accessibility** to configure accessibility options.
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@
"mkdirp": "^3.0.0",
"mockdate": "^3.0.5",
"nock": "^13.5.4",
"nodemon": "3.1.0",
"nodemon": "3.1.2",
"npm-merge-driver-install": "^3.0.0",
"nth-check": "2.1.1",
"prettier": "^3.2.5",
Expand Down

0 comments on commit 613ed1a

Please sign in to comment.