mirror of
https://github.com/git-tips/tips
synced 2024-11-10 05:44:14 +00:00
Merge pull request #198 from Masa-Shin/add-git-stash-show-tip
Add a tip to view what's in a stash
This commit is contained in:
commit
474306e30e
2 changed files with 9 additions and 0 deletions
|
@ -58,6 +58,7 @@ P.S: All these commands are tested on `git version 2.7.4 (Apple Git-66)`.
|
||||||
* [Saving current state with message](#saving-current-state-with-message)
|
* [Saving current state with message](#saving-current-state-with-message)
|
||||||
* [Saving current state of all files (ignored, untracked, and tracked)](#saving-current-state-of-all-files-ignored-untracked-and-tracked)
|
* [Saving current state of all files (ignored, untracked, and tracked)](#saving-current-state-of-all-files-ignored-untracked-and-tracked)
|
||||||
* [Show list of all saved stashes](#show-list-of-all-saved-stashes)
|
* [Show list of all saved stashes](#show-list-of-all-saved-stashes)
|
||||||
|
* [Show the contents of any stash in patch form](#show-the-contents-of-any-stash-in-patch-form)
|
||||||
* [Apply any stash without deleting from the stashed list](#apply-any-stash-without-deleting-from-the-stashed-list)
|
* [Apply any stash without deleting from the stashed list](#apply-any-stash-without-deleting-from-the-stashed-list)
|
||||||
* [Apply last stashed state and delete it from stashed list](#apply-last-stashed-state-and-delete-it-from-stashed-list)
|
* [Apply last stashed state and delete it from stashed list](#apply-last-stashed-state-and-delete-it-from-stashed-list)
|
||||||
* [Delete all stored stashes](#delete-all-stored-stashes)
|
* [Delete all stored stashes](#delete-all-stored-stashes)
|
||||||
|
@ -510,6 +511,11 @@ git stash push --all
|
||||||
git stash list
|
git stash list
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Show the contents of any stash in patch form
|
||||||
|
```sh
|
||||||
|
git stash show -p <stash@{n}>
|
||||||
|
```
|
||||||
|
|
||||||
## Apply any stash without deleting from the stashed list
|
## Apply any stash without deleting from the stashed list
|
||||||
```sh
|
```sh
|
||||||
git stash apply <stash@{n}>
|
git stash apply <stash@{n}>
|
||||||
|
|
|
@ -152,6 +152,9 @@
|
||||||
"title": "Show list of all saved stashes",
|
"title": "Show list of all saved stashes",
|
||||||
"tip": "git stash list"
|
"tip": "git stash list"
|
||||||
}, {
|
}, {
|
||||||
|
"title": "Show the contents of any stash in patch form",
|
||||||
|
"tip": "git stash show -p <stash@{n}>"
|
||||||
|
}, {
|
||||||
"title": "Apply any stash without deleting from the stashed list",
|
"title": "Apply any stash without deleting from the stashed list",
|
||||||
"tip": "git stash apply <stash@{n}>"
|
"tip": "git stash apply <stash@{n}>"
|
||||||
}, {
|
}, {
|
||||||
|
|
Loading…
Reference in a new issue