How to compare a file from two different branches?

JA Fuhr May 31, 2023

I found this article but when I follow the suggested step to do the Compare, I do not get the option to select the branch I want to compare.

Compare files on two different branches? (atlassian.com)

My situation is that I have a production branch and an upgrade branch.  I need to compare a single file, foo.html, in both branches to see the differences.

Following the steps in the answer above, I 

  1. Selected the repo
  2. Clicked Branches in the left menu
  3. Under Actions, clicked the three dots on the upgrade branch
  4. Selected Compare
  5. It goes to a  page where the only options are Diff, Commits, Merged Pull Requests

I have four branches in this repo.   How do I choose the two I want to compare?

1 answer

1 accepted

0 votes
Answer accepted
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 1, 2023

Hello @JA Fuhr and thank you for reaching out to Community!

After clicking on the Compare option under the three-dot icon menu, you should be redirected to a page similar to below image : 

Screenshot 2023-06-01 at 11.48.53 AM.png

The source and destination branch of the comparison can be configured by selecting the "change destination" or "change source" options in the UI. Once clicking on any of those options you should be provided with a drop-down to select the desired branch.

Once the branches you want to compare are selected, you can navigate to the Diff column where all the changed files between the branches will be listed. If a file is not listed there it means there's no difference.

To check the diff of a specific file you can click on its name in the Files changed list and it will automatically scroll the page to the corresponding diff.

Hope that helps! Let me know in case you have any questions.

Thank you, @JA Fuhr !

Patrik S

JA Fuhr June 2, 2023

Thanks!  

Like David Altemir likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events