Git: Performing a diff between two stashes

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.

3

1 Answer

As mentioned by Confuzing and Per Quested Aronsson 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.

1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like