Skip to content

Commit 1242534

Browse files
committed
Add tips to view what's in a stash
1 parent b09c59c commit 1242534

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

Diff for: 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)
@@ -511,6 +512,11 @@ git stash push --all
511512
git stash list
512513
```
513514

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

Diff for: 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)