Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to view all stashes at once?

Tags:

git

git-stash

It's time-consuming to read through dozens of stashes, one-by-one, by issuing:

git stash show -p 'stash@{N}' # Where "N" is the stash index

Is there a way to view all stashes at once (in patch form)? Note that I don't want to view all the stashes merged into one big patch because that would prevent me from applying a specific stash, which is what I want to do.

like image 975
DBedrenko Avatar asked Sep 28 '15 09:09

DBedrenko


People also ask

How do I view git stash?

By default, the command shows the diffstat, but it will accept any format known to git diff (e.g., git stash show -p stash@{1} to view the second most recent entry in patch form).

How can I see my stash changes without applying?

git stash show -p stash@{0} --name-only shows just the names of the files (not the contents) in your first stash. @mrgloom If you want to see the stashed changes for a single file, then something like git diff stash@{0}^! -- file. txt will do it.

Where are stashes saved?

All are stored in . git/refs/stash . git stash saves stashes indefinitely, and all of them are listed by git stash list . Please note that dropping or clearing the stash will remove it from the stash list, but you might still have unpruned nodes with the right data lying around.


1 Answers

Is it possible you are looking for the command

git stash list -p

As mentioned in http://git-scm.com/docs/git-stash you can add all options from git log to git stash list...

like image 85
BartBog Avatar answered Oct 18 '22 20:10

BartBog