Skip to content

Commit 474306e

Browse files
authored
Merge pull request #198 from Masa-Shin/add-git-stash-show-tip
Add a tip to view what's in a stash
2 parents 1a97486 + ec4301c commit 474306e

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

README.md

+6
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ P.S: All these commands are tested on `git version 2.7.4 (Apple Git-66)`.
5858
* [Saving current state with message](#saving-current-state-with-message)
5959
* [Saving current state of all files (ignored, untracked, and tracked)](#saving-current-state-of-all-files-ignored-untracked-and-tracked)
6060
* [Show list of all saved stashes](#show-list-of-all-saved-stashes)
61+
* [Show the contents of any stash in patch form](#show-the-contents-of-any-stash-in-patch-form)
6162
* [Apply any stash without deleting from the stashed list](#apply-any-stash-without-deleting-from-the-stashed-list)
6263
* [Apply last stashed state and delete it from stashed list](#apply-last-stashed-state-and-delete-it-from-stashed-list)
6364
* [Delete all stored stashes](#delete-all-stored-stashes)
@@ -510,6 +511,11 @@ git stash push --all
510511
git stash list
511512
```
512513

514+
## Show the contents of any stash in patch form
515+
```sh
516+
git stash show -p <stash@{n}>
517+
```
518+
513519
## Apply any stash without deleting from the stashed list
514520
```sh
515521
git stash apply <stash@{n}>

tips.json

+3
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,9 @@
152152
"title": "Show list of all saved stashes",
153153
"tip": "git stash list"
154154
}, {
155+
"title": "Show the contents of any stash in patch form",
156+
"tip": "git stash show -p <stash@{n}>"
157+
}, {
155158
"title": "Apply any stash without deleting from the stashed list",
156159
"tip": "git stash apply <stash@{n}>"
157160
}, {

0 commit comments

Comments
 (0)