Question

I am trying to get a diff between two branches in stash. Specially before sending the pull request, wanted to verify the changes.

have been reading many articles trying to figure out a solution but haven't succeeded yet.

here are the articles I have looked into:

Git diff against a stash Compare and Diff for Branches

Does anyone have a solution?

Was it helpful?

Solution

Currently, the only way to compare branches in Atlassian Stash is to create a pull request first. Otherwise, you can use local git commands to compare arbitrary commits or branches.

This is something we plan to improve in a future release. You can watch for updates here.

Edit: Since Stash 3.0 it is possible to compare branches directly in Stash

OTHER TIPS

Do a git stash list to get the list of stashes. Then pick the ones you need to diff and use git diff on those two stashed changes

For example

~/> git stash list
stash@{0}: On XXX: temp1
stash@{1}: On XXX: temp
~/> git diff stash@{0} stash@{1}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top