Skip to content

Commit 3e6f08f

Browse files
authored
Merge pull request #3598 from github/desktop-stashing-changes
[GitHub Desktop] Stashing changes feature
2 parents 5e047f7 + 01117e3 commit 3e6f08f

17 files changed

+88
-13
lines changed
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading

content/desktop/contributing-and-collaborating-using-github-desktop/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ versions:
1919
{% topic_link_in_list /making-changes-in-a-branch %}
2020
{% link_in_list /managing-branches %}
2121
{% link_in_list /committing-and-reviewing-changes-to-your-project %}
22+
{% link_in_list /stashing-changes %}
2223
{% link_in_list /pushing-changes-to-github %}
2324
{% link_in_list /reverting-a-commit %}
2425
{% link_in_list /managing-tags %}

content/desktop/contributing-and-collaborating-using-github-desktop/managing-branches.md

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,7 @@ If you create a branch on {% data variables.product.product_name %}, you'll need
6767
![The Publish branch button](/assets/images/help/desktop/publish-branch-button.png)
6868

6969
### Switching between branches
70-
You can view and make commits to any of your repository's branches. If you have uncommitted, saved changes, you'll need to decide what to do with your changes before you can switch branches. You can commit your changes on the current branch, stash your changes on the current branch, or bring the changes to your new branch. If you want to commit your changes on the current branch, follow the steps in "[Committing and reviewing changes to your project](/desktop/contributing-to-projects/committing-and-reviewing-changes-to-your-project)" before switching branches.
71-
70+
You can view and make commits to any of your repository's branches. If you have uncommitted, saved changes, you'll need to decide what to do with your changes before you can switch branches. You can commit your changes on the current branch, stash your changes to temporarily save them on the current branch, or bring the changes to your new branch. If you want to commit your changes before switching branches, see "[Committing and reviewing changes to your project](/desktop/contributing-to-projects/committing-and-reviewing-changes-to-your-project)."
7271
{% tip %}
7372

7473
**Tip**: You can set a default behavior for switching branches in the **Advanced** settings. For more information, see "[Configuring basic settings](/desktop/getting-started-with-github-desktop/configuring-basic-settings)."
@@ -81,17 +80,6 @@ You can view and make commits to any of your repository's branches. If you have
8180
3. If you have saved, uncommitted changes, choose **Leave my changes** or **Bring my changes**, then click **Switch Branch**.
8281
![Switch branch with changes options](/assets/images/help/desktop/stash-changes-options.png)
8382

84-
### Retrieving stashed changes
85-
To access changes you've stashed in another branch, switch back to the branch you stashed the changes in.
86-
87-
{% data reusables.desktop.current-branch-menu %}
88-
{% data reusables.desktop.switching-between-branches %}
89-
![List of branches in the repository](/assets/images/help/desktop/click-branch-in-drop-down-mac.png)
90-
3. In the left sidebar, click **Stashed Changes**.
91-
![Stashed changes option](/assets/images/help/desktop/stashed-changes.png)
92-
4. To delete your stashed changes, click **Discard**, or to use your stashed changes, click **Restore**.
93-
![Discard or Restore stashed changes](/assets/images/help/desktop/discard-restore-stash-buttons.png)
94-
9583
### Deleting a branch
9684

9785
You can't delete a branch if it's currently associated with an open pull request. You cannot undo deleting a branch.
@@ -120,3 +108,4 @@ You can't delete a branch if it's currently associated with an open pull request
120108
- "[Branch](/articles/github-glossary/#branch)" in the {% data variables.product.prodname_dotcom %} glossary
121109
- "[About branches](/articles/about-branches)"
122110
- "[Branches in a Nutshell](https://git-scm.com/book/en/v2/Git-Branching-Branches-in-a-Nutshell)" in the Git documentation
111+
- "[Stashing changes](/desktop/contributing-and-collaborating-using-github-desktop/stashing-changes)"

0 commit comments

Comments
 (0)