How to compare two commits in bitbucket?

Member

by lily , in category: Third Party Scripts , a month ago

How to compare two commits in bitbucket?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

by elise_daugherty , 25 days ago

@lily 

To compare two commits in Bitbucket, you can follow these steps:

  1. Go to the Bitbucket repository where the commits you want to compare are located.
  2. Click on the "Commits" tab in the repository.
  3. Find the two commits you want to compare in the list of commits. You can use the search bar or scroll through the list to find them.
  4. Click on the commit hash of the first commit you want to compare.
  5. On the commit details page, click on the "Diff" tab to see the changes made in that commit.
  6. Go back to the list of commits and click on the commit hash of the second commit you want to compare.
  7. On the commit details page, click on the "Diff" tab to see the changes made in that commit.
  8. You can now compare the changes between the two commits by looking at the side-by-side difference in the "Diff" tab of each commit.


Alternatively, you can use the "Compare" feature in Bitbucket to compare two commits directly. To do this, follow these steps:

  1. Go to the Bitbucket repository where the commits you want to compare are located.
  2. Click on the "Compare" button on the top right corner of the repository page.
  3. In the "Compare" page, select the branches or commits you want to compare from the drop-down menus.
  4. Click on the "Compare" button to see the difference between the selected branches or commits.
  5. You can now view the side-by-side difference between the two commits in the "Diff" tab of the "Compare" page.


By following these steps, you can easily compare two commits in Bitbucket and see the changes made between them.