File tree Expand file tree Collapse file tree 2 files changed +27
-1
lines changed Expand file tree Collapse file tree 2 files changed +27
-1
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ smart people at [Hashrocket](http://hashrocket.com/).
1010For a steady stream of TILs from a variety of rocketeers, checkout
1111[ til.hashrocket.com] ( https://til.hashrocket.com/ ) .
1212
13- _ 712 TILs and counting..._
13+ _ 713 TILs and counting..._
1414
1515---
1616
@@ -198,6 +198,7 @@ _712 TILs and counting..._
198198- [ Show List Of Most Recently Committed Branches] ( git/show-list-of-most-recently-committed-branches.md )
199199- [ Show The diffstat Summary Of A Commit] ( git/show-the-diffstat-summary-of-a-commit.md )
200200- [ Show The Good And The Bad With Git Bisect] ( git/show-the-good-and-the-bad-with-git-bisect.md )
201+ - [ Show What Is In A Stash] ( git/show-what-is-in-a-stash.md )
201202- [ Single Key Presses in Interactive Mode] ( git/single-key-presses-in-interactive-mode.md )
202203- [ Staging Changes Within Vim] ( git/staging-changes-within-vim.md )
203204- [ Staging Stashes Interactively] ( git/staging-stashes-interactively.md )
Original file line number Diff line number Diff line change 1+ # Show What Is In A Stash
2+
3+ Usually when I want to inspect anything in git, I'll use ` git show ` with a
4+ specific ref. This can even be done with stash refs.
5+
6+ ``` bash
7+ $ git stash list
8+ stash@{0}: WIP on ...
9+ stash@{1}: Some commit on ...
10+
11+ $ git show stash@{0}
12+ # ...
13+ ```
14+
15+ The ` git-stash ` command has a built-in way of showing stashes that will save
16+ you from having to type out the somewhat awkward ` stash@{n} ` ref.
17+
18+ ``` bash
19+ $ git stash show 1
20+ ```
21+
22+ This will show you the ` stash@{1} ` ref. You can also omit a number which
23+ will show you the latest stash (` stash@{0} ` ).
24+
25+ See ` man git-stash ` for more details.
You can’t perform that action at this time.
0 commit comments