-
Notifications
You must be signed in to change notification settings - Fork 59.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3598 from github/desktop-stashing-changes
[GitHub Desktop] Stashing changes feature
- Loading branch information
Showing
17 changed files
with
88 additions
and
13 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+37.7 KB
assets/images/help/desktop/windows-discard-stashed-changes-button.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
...desktop/contributing-and-collaborating-using-github-desktop/stashing-changes.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
title: Stashing changes | ||
intro: You can temporarily save your changes without committing them to a branch by stashing the changes. | ||
versions: | ||
free-pro-team: '*' | ||
--- | ||
|
||
### About stashed changes | ||
|
||
To apply your changes to your repository, you must save the files and then commit the changes to a branch. If you have saved changes that you are not ready to commit yet, you can stash the changes for later. When you stash changes, the changes are temporarily removed from the files and you can choose to restore or discard the changes later. You can only stash one set of changes at a time with {% data variables.product.prodname_desktop %}. If you use {% data variables.product.prodname_desktop %} to stash changes, all unsaved changes will be stashed. After you stash changes on a branch, you can safely change branches or make other changes to your current branch. | ||
|
||
If you use {% data variables.product.prodname_desktop %} to switch branches while you have saved, but not committed, changes, {% data variables.product.prodname_desktop %} will prompt you to stash the changes or bring them to the other branch. For more information, see "[Managing branches](/desktop/contributing-to-projects/managing-branches#switching-between-branches)." | ||
|
||
### Stashing changes | ||
|
||
{% data reusables.desktop.click-changed-files-header %} | ||
{% data reusables.desktop.click-stash-all-changes %} | ||
|
||
### Restoring stashed changes | ||
|
||
{% data reusables.desktop.navigate-to-stashed-changes %} | ||
{% data reusables.desktop.click-stashed-changes %} | ||
{% data reusables.desktop.click-restore %} | ||
|
||
### Discarding stashed changes | ||
|
||
{% data reusables.desktop.navigate-to-stashed-changes %} | ||
{% data reusables.desktop.click-stashed-changes %} | ||
{% data reusables.desktop.click-discard %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
1. Right click the **changed files** header. | ||
|
||
{% mac %} | ||
|
||
![The changed files header](/assets/images/help/desktop/mac-changed-file-header.png) | ||
|
||
{% endmac %} | ||
|
||
{% windows %} | ||
|
||
![The changed files header](/assets/images/help/desktop/windows-changed-file-header.png) | ||
|
||
{% endwindows %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
1. Click **Discard**. | ||
|
||
{% mac %} | ||
|
||
![Discard stashed changes button](/assets/images/help/desktop/mac-discard-stashed-changes-button.png) | ||
|
||
{% endmac %} | ||
|
||
{% windows %} | ||
|
||
![Discard stashed changes button](/assets/images/help/desktop/windows-discard-stashed-changes-button.png) | ||
|
||
{% endwindows %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
1. Click **Restore**. | ||
|
||
{% mac %} | ||
|
||
![Restore stashed changes button](/assets/images/help/desktop/mac-restore-stashed-changes-button.png) | ||
|
||
{% endmac %} | ||
|
||
{% windows %} | ||
|
||
![Restore stashed changes button](/assets/images/help/desktop/windows-restore-stashed-changes-button.png) | ||
|
||
{% endwindows %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
1. Click **Stash All Changes**. | ||
|
||
{% mac %} | ||
|
||
![The Stash All Changes menu item](/assets/images/help/desktop/mac-stash-all-changes.png) | ||
|
||
{% endmac %} | ||
|
||
{% windows %} | ||
|
||
![The Stash all changes menu item](/assets/images/help/desktop/windows-stash-all-changes.png) | ||
|
||
{% endwindows %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
1. In the left sidebar, click **Stashed Changes**. | ||
![Stashed changes option](/assets/images/help/desktop/stashed-changes.png) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
1. If you are not already on the branch where the changes are stashed, click {% octicon "git-branch" aria-label="The branch icon" %} **Current Branch**, then click the branch with stashed changes. | ||
![List of branches in the repository](/assets/images/help/desktop/click-branch-in-drop-down-mac.png) |