Git: Performing a diff between two stashes

diff()git

Is it possible with Git to perform a diff between two stashes?

For instance, I have the following stashes:

stash@{2}: On peformanceFix#3: 20170728T164841
stash@{3}: On peformanceFix#2: 20170727T073349

I want a diff between the two.

Best Answer

As mentionned by @Confuzing in the comments, the simplest solution is:

git diff stash@{2} stash@{3}

It also works with the -p added, but that does not add much value.

git diff -p stash@{2} -p stash@{3}

Oddly, Git's documentation does not suggest to use twice the -p option. I just tried it and found out it worked.

Related Question