UPDATE with more concise log command...
You might notice that even with --all
, gitk does not list all stashes. This is because stashes are not distinct refs; they are reflog entries on the single ref stash
.
You can still list multiple stashes, such as by saying
gitk stash@{0} stash@{1}
but only the most recent stash commit will be shown as having a ref pointed at it (which is true; again, the rest are reflog entries).
To automatically include every stash, you can do something like this
gitk `git stash list --format=%H`
This may not help much, though, as a stash's full history would be shown. (And again, only the most recent stash would show with a ref pointed at it, so spotting the others in a long history might not be easy.)
With git log
you could do something like
git log `git rev-parse $(git stash list --format=^%H^)` `git stash list --format=%H`
or, more concisely,
git log `git rev-parse $(git stash list --format=%H^..%H)`
to cut the history short and show only stash commits, but gitk
doesn't seem inclined to honor the ^<commit>
exclusions. Also -n 1
doesn't work because that limits the total number of commits output, not the number per ref (and besides, gitk then decides to be helpful by filling in the history anyway).
So I'm not entirely sure you can do what you want with gitk. But on the other and, the graph that gitk draws would just be a disjointed mess anyway, so maybe the log
approach could be adapted to suit your needs?