Bitbucket: how to display differences between current commit and previous commit

28 views Asked by At

example: commit d4c1011 and commit 44ac855

tried to see the difference in bitbucket.org could not find answer doing google search, tried Sourcetree and found the way to do it. It will be in my answer below.

1

There are 1 answers

0
alfalabs On

SourceTree (according to google search) can not show the difference between two git commits. But... Source tree will show the difference between branches.

You need two branches, one with latest commit and other with previous commit. You already have the latest, it should be master..

  1. In graph with branches, find previous commit and create a new branch: Right-click the previous commit and select "Branch..." then create a New Branch. Let's name it "previous_branch" because you will remove it after.
  2. Go back to master branch
  3. In branch list (left to graph window) the master should be highlighted, right-click "previous_branch" and select "Diff Against Current", the current is master branch.
  4. You should see all files with changes between two commits!