TL;DR
On your local repo, you need to look at the following diff:
# the diff: git diff master...onemsg-uat1 # 3 dots, not a typo git diff destination...source # the list of modified files: git diff --name-only master...onemsg-uat1
more details below
The screen capture you show has a notion of source and destination branches, and has a Create pull request button.
I'm not familiar with Bitbucket GUI, but all git services that offer a Pull Request mechanism (Github, Gitlab (they're called "Merge Requests" in Gitlab), Azure Devops, ...) have a similar view :
the diff that is displayed is :
- the list of changes that
source would bring in if you merged it into destination
which is not the same as :
- all differences between
source and destination.
With a diagram :
# say your branches 'master' and 'release/onemsg-uat1' look like this : D--E--F <- release/onemsg-uat1 (source) / --*--X--A--B <- master (destination) ^ fork point, aka "merge base"
To represent "the changes brought in by the source branch", rather than looking at the complete diff between B and F, the GUI presents you with changes starting from X :
a. if you open a Pull request to merge release/onemsg-uat1 (source) into master (destination) : the changes to review are the diff between X and F,
b. if you swap the branches, and look at what master would bring to release/onemsg-uat1 : the changes to review are the diff between X and B.
In git terminology, X is called the "merge base" of the two branches, and you can get its sha1 with git merge-base master release/onemsg-uat1.
One first way to look at those diffs from your local repo is :
# changes introduced in release/onemsg-uat1 : git diff $(git merge-base master release/onemsg-uat1) release/onemsg-uat1 # changes introduced in master : git diff $(git merge-base master release/onemsg-uat1) master
There is a shortcut for the above command : the three dots notation git diff a...b
# changes introduced in release/onemsg-uat1 : git diff master...release/onemsg-uat1 # changes introduced in master : git diff release/onemsg-uat1...master
To list only the affected files, use --name-only or --name-status :
git diff --name-only master...release/onemsg-uat1 git diff --name-status master...release/onemsg-uat1
To open this diff in a graphical diff viewer, use git difftool :
# the following command will open the differing files one at a time : git difftool master...release/onemsg-uat1 # with the '-d' option, you will view the diff of two complete directories : git difftool -d master...release/onemsg-uat1
masterand doinggit diff uat, then checking outuatand doinggit diff master, and somewhere betweenmasteranduatsomeone changed the line ending sequence, then depending on your autocrlf settings, what you have in the work tree could differ in one case but not the other. And this would make the files "look" the same while still calculating different hashes.git merge masterand then when I fixed all the conflicts and looked at my git status I saw a bunch of files that were going to get committed. However, I knew the only changes I made in the uat1 branch were a few files so I compared the two branches in bitbucket and noticed the list of files of the diff were totally different when chosing what source and destination to compare the two.