When I'm viewing a page with the source code of a certain file on the "master" or "main" branch, often I want to copy the URL of that file but at its actual commit hash so that it's a permalink.

GitLab makes this super obvious. E.g. https://gitlab.com/gitlab-com/chief-of-staff-team/cos-team/-/blob/master/.gitlab/issue_templates/informal_board_meeting.md shows:

enter image description here

GitHub makes it possible too.

What is the fastest, most convenient way to do the same in Bitbucket?

2 Answers 2


Its not quick per se, but it is the quickest I've found :-/

Tested on Bitbucket Server v6.10.1

  1. Navigate in the bitbucket to the file you want to link to e.g. https://bitbucket.acme.com/bitbucket/projects/foo/repos/bar/browse/docker/Dockerfile
  2. In the right hand corner of the page there should be sentence like: 'Ms. Frizzle authored fb67a3f2efc 07 April 2021 03:16 PM' Copy the git sha into your clipboard.
  3. In your browser address bar add '?at=' to the end of the url in 1, then paste in the git sha from 2) and hit return, e.g. https://bitbucket.acme.com/bitbucket/projects/foo/repos/bar/browse/docker/Dockerfile?at=fb67a3f2efc

That should give you a shareable permalink.


On Bitbucket Server v6.10.8 (You find your version on the very bottom of any bitbucket page. Maybe this also works for older versions)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.