1. Bitbucket
  2. Public Issue Tracker
  3. master


Issue #7150 new

Option to replace the commit hash in URL with branch name when browsing source tree (BB-8297)

Edi Modrić
created an issue

Please see here for discussion:



It would be nice to provide an option to create URLs with branch name instead of commit hash when browsing the repo. For the most part, when I link to file or folder in the repo, I want the link to point to the latest commit in the branch, and not the specific one.

GitHub does it nicely by generating URLs like this: https://github.com/symfony/symfony-standard/tree/master/src

Comments (9)

  1. Brodie Rao

    Hi Edi,

    I agree that this would be nice to have. It's unfortunately not a trivial thing to do, as we have some issues around branch/tag names with slashes in them that we'd need to resolve before we do this.

    In the meantime, I've put an issue in our backlog. Hopefully we can look into it soon. Thanks for the report!

  2. Peter Bittner

    Just to make sure we're all on the same page,

    readable URLs (without commit hash) are working on Bitbucket. They look like this:


    The line number bit, #...., naturally, is optional. So, there's not even a tree/ and blob/ part in the URL that bothers me on GitHub. Instead, it's always src/ here, the rest of the URL scheme is identical.

    Here is an Example:

    Any long, default URL, such as ...


    ... can be rewritten in this shorter, more beautiful, readable version ...


    ... and it's working fine! (NOTE: the selected branch moves from the query string to the place where the commit hash is in the default URL scheme.)

    Left to Do

    The only thing that bothers now is that the shorter, beautiful URL scheme is not the default on Bitbucket. :-( Any plans on changing the default?

  3. Már Örlygsson

    It is super annoying to see that this fairly straightforward feature-request lies untouched for 2-3 years! ...like so many others.

    Please make this the default behaviour - unless you're waiting for someone to write a browser-extension to fix this on the client side. :-)

  4. JimNasby

    Yeah, this is extremely annoying. Github handles this correctly: by default you get "master" in the URL instead of the hash. This makes a LOT more sense for general usage!

  5. Log in to comment