I'm aware of git stash show -p stash@{0}
giving the log of changes saved into that stash entry, but I'd like to know what branch I was on when I made those changes. This would be very helpful for a number of scenarios:
That is shown with git stash list
. In this example "on dude" shows branch dude and "on master" shows branch master.
$ git stash list
stash@{0}: WIP on dude: 7eb87fe initial
stash@{1}: WIP on master: 7eb87fe initial
Also, it sounds like you are stashing when you abandon work temporarily. I have another workflow that I think is superior to stashing, I commit it and then reset it. That way the change is on the branch and if I ever abandon that branch the related code is discarded as well.
# do some work on dev
git co -b dev
# temporarily abandon it
git commit -a -m'commit instead of stash'
# do other work on master
git co master
# lets resume the old work
git co dev
# un stash
git reset HEAD^