Show all stashes in git log
Solution 1
I came here looking to do the same as @jbialobr, I did some more digging after reading the previous answers and came up with the below.
@msmt's answer gives you a log of the stashes, and you can use this to get the hashes to use in the git log.
git reflog show --format="%h" stash
gives you just the hashes of all stashes which can then be passed to a git log command such as
git log --date-order --all $(git reflog show --format="%h" stash)
The full command I personally am now using is
git log --oneline --graph --decorate --all $(git reflog show --format="%h" stash)
Tested on git version 2.5.1 on centos
Solution 2
You can show all your stashes with git stash list
. Maybe you can write a script to show both git stash list
and git log
and use it with an alias.
Solution 3
Not sure what you mean. stash is a branch and you can list all stashes with git log -g stash
.
Solution 4
Another easy way to do this is git reflog show stash
Solution 5
Full command:
git log --oneline --graph --all $(git stash list --format="%H")
Where list of heads of stashes:
git stash list --format="%H"
jbialobr
Updated on January 21, 2022Comments
-
jbialobr over 2 years
I would like to see all stashes in
git log
output. Does anyone know if there is a way to do that?Edit: I want to log all commits. I use the command
git log --date-order --all
But it returns only the top most stash. I would like to see commits that represent other stashes.