Kirill
Kirill

Reputation: 8088

How to get permanent link to a file with BitBucket server?

Sometimes I want to provide a link to some source code in the comment to an issue. If I open repository in browser and find the fileI need, the link refers to master branch by default. It means that over time the code referred by the link will change, because the master will move together with commits history.

In GitHub and GitLab when you want to get a permanent link on a file you just opened, it is enough to press y on the keyboard and the link will switch from referring the master branch to particular commit hash it points to.

I.e. https://github.com/octocat/Hello-World/blob/master/README -> https://github.com/octocat/Hello-World/blob/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d/README

At work I use BitBucket server (v7.10.1, if it matters) and unfortunately the y does not work, and I also do not see any button on UI to get permanent link. How can I achieve the same result (get permanent link) on BitBucket server?

I know a couple of tricks I am not satisfied with:

Upvotes: 5

Views: 1800

Answers (1)

eeijlar
eeijlar

Reputation: 1340

Got to the version you want, and then click 'Raw file' (top right hand side of screen)

enter image description here

The path in the address bar should now be a permanent link. It will be the raw version of the file unfortunately, but it is a permanent link.

Upvotes: 3

Related Questions