Permalink to the "head" revision of a resource in a git repo

Issue #9358 duplicate
Juan Manuel Palacios
created an issue

Currently bitbucket only provides permalink ULR's for resources in a git repository by embedding specific commit hashes in their URL's, e.g.:<user>/<repo>/src/<commitHash>/<resource>?at=<branch>;

This is great for always viewing the state of that resource at that specific commit, but it doesn't work if you always want to view it at its latest revision, i.e. the "head" revision for the given branch of the repository.

It would be great if it were possible to obtain such URL for any resource in a repository, even directories, possibly by removing the commit hash entirely and making the resulting URL always point to the "head" revision of the resource, e.g.:<user>/<repo>/src/<resource>?at=<branch>;

or maybe even:<user>/<repo>/src/head/<resource>?at=<branch>;

By providing any of those URL's, or something equivalent / more appropriate, we could e.g. copy & paste that into a mail and send it to a friend / co-worker, and rest assured that they'll always be looking at the latest incarnation of the resource. By embedding commit hashes in the URL's this becomes impossible, and I'm yet to find a way to keep commit hashes from creeping into the URL's.

Comments (3)

  1. Michael Frauenholtz staff

    Hi Juan,

    I think you can get most of what you want right now by substituting the branch name in place of the commit hash or HEAD in the URL. An example would be That link should always point to the latest revision of that branch.

    We do have some other improvements we'd like to make around our source URLs, documented in Issue #8042. I'm going to mark this as a duplicate, but if there's anything else you'd like to see that isn't covered in that issue, either comment in that issue or reopen this one.

  2. Log in to comment