4

We configure our diff visual tool using diff.tool=xxx and then running git difftool to see a visual diff. You can see a stash using git stash show - but how can you see the stash visually like you can with diff?

Community
  • 1
  • 1
Marcus Leon
  • 55,199
  • 118
  • 297
  • 429

2 Answers2

7

Just use the stash's name. For example, the following works for me:

git diff branch stash@{0}
choroba
  • 231,213
  • 25
  • 204
  • 289
0

Using git diff ..stash@{0} (equivalent to the answer by @choroba) does not work well if the base branch of the stash is significantly different than your current branch.

A stash is essentially a merge commit so the most simple way to view the changes stored in a stash is git show:

git show stash@{0}

Which is roughly equivalent to this if you prefer to use diff:

git diff stash@{0}^..stash@{0}
ColinM
  • 13,367
  • 3
  • 42
  • 49