1. Bitbucket Website
  2. Public Issue Tracker
  3. master


Issue #4779 new

Ability to diff between any two *commits* (not revisions of a single file) (BB-6045)

created an issue

In the list of commits (URL: /<username>/<projectname>/changesets), let’s have some UI to select any two commits and see a diff between them.

A possible UI might look like this: every commit has a little icon to its left which symbolises “diff”. When you click on one, it just gets depressed. Perhaps a message could show somewhere to invite you to click on another one. Once you click on a second one, the page reloads and a diff between the two commits is shown.

Comments (53)

  1. Roman Starkov

    I was quite surprised that the UI behind the "Compare" button doesn't accept two arbitrary revisions. It really should. Mercurial itself accepts revisions and branches interchangeably; so should the "Compare" UI.

  2. Timwi reporter

    Well, personally I feel the “Compare” UI is a usability dead-end. For it to be useful it would have to present the list of changesets as nicely and usefully as the “Commits” page does, so you might as well use the “Commits” page instead. If you only show the changeset date/time and description, users lose the ability to identify changesets by their relationship to other changelists.

  3. Tyler Collier

    I think I found it, they already have the ability.

    Here's an example URL:


    It worked great for me!

  4. Kevin Verre

    Hi, I would also like to voice my support for this feature.

    In git you can see the differences between two commits by doing "git diff commit1..commit2"

    In Bitbucket, there doesn't seem to be a way of doing this through the UI unless the commits are the last commits of two different branches, in which case you can diff the branches (if you think of it). Tyler provided a URL that allows us to see the git diff without getting to it through the UI:


    However, it should be noted that the order of the commit arguments is reverse when using this URL compared to using Git. For example, if Commit B was the commit directly after Commit A, then git diff A..B shows the contents of Commit B whereas git diff B..A shows what it takes to revert Commit B. Using this URL method allows to go from A..B if you submit B..A and doesn't allow you to see B..A.

  5. Tamás Barta

    Only if we had an open source alternative... Oh, wait, we have... GitLab does everything and more than Bitbucket, and does it much better (and faster). Tickets like this makes Bitbucket really-really unappealing. Same with no source code search... It's really time to do something about this! I already almost convinced my bosses to switch from our Bitbucket plan.

  6. jgcouture

    Gitlab has this feature, Github has it, every Git client has it... Forging the URL manually is doable but not very practical.

    Count me in on this feature request.

  7. Thom Baynes

    I could be wrong, but I think we are already using this feature? Here is an example URL to try. Only works on commits within a single branch.


    We use this on our master branch to check for updated client content before publishing it. Here is what that looks like (diff between latest master commit to a specific previous commit):


  8. Avi Kehat


    You're sample is a "diff between latest master commit to a specific previous commit".

    What we want is a not to compare the "latest master commit". We want to compare any 2 specific previous commits.



  9. Marcus Liebhardt

    For the ones who just want to compare to branches/tags, there is the compare action.

    Would be nice to extend this action to allow selecting also commits for comparison.

  10. Log in to comment