tags:

views:

50

answers:

2

I often put work away for later, then other stuff comes along, and a few weeks later, I want to inspect the stash, and find out what changes it would make if I applied it to working tree in its current state.

I know I can do a git diff on the stash, but this shows me all the differences between the working tree and the stash, whereas I'm just interested to know what the stash apply is going to change.

How can I do this?

+2  A: 

By simply applying the stash using git stash apply? This doesn't remove the stash, so you can reset you working tree without loosing the stashed work, if you don't like the changes. And if you like them, you can simply remove the stash with git stash drop.

lunaryorn
Thanks, it was just too obvious for me to think of it!
Benjol
+1  A: 

git stash show will show you the files that changed, you can add the -p option to show the diff

git stash show -p
Jlew
That looks good, and I see it in the manual, but when I try it gives me `fatal: unable to create temp-file: Invalid argument` - any idea why?
Benjol
I have never seen that so I am unsure, sorry.
Jlew