Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Browse source code for specific commit

Yuri Geinish
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 12, 2019

Hi, can't find how to do that in the web UI. It works for branches, not individual commits like Github does. I need to be able to share links to the source code of specific commits with the team. Thanks.

3 answers

1 accepted

7 votes
Answer accepted
Julius Davies _bit-booster_com_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 14, 2019

 

It's a little awkward, but it is possible.

1.)  Navigate to the source code area of your repository in the Bitbucket UI.

2.)  Use the branch/tag selector to change the branch to something different than the default.  (This causes the URL to receive an "?at=refs%2Fheads%2F<BRANCH>" parameter).

3.)  Change whatever is inside the "?at=" parameter to point to the commit-id you want to look at source code for (e.g., ?at=5557caa219b945d552dfa58d8f2c1ed91252924b).

 

Here's a live example you can play with, although the repository it points to had no files at that particular commit (I was doing a bunch of "git commit --allow-empty" invocations to create exotic commit graph structures for testing purposes):

 

https://vm.bit-booster.com/bitbucket/projects/BB/repos/flower/browse?at=a9d624311109b22e98dee5f3aaad30809b085363

 

 

Yuri Geinish
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 15, 2019

Gotcha, thanks!

3 votes
Jason Antonacci
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 19, 2022

Having to hack the URL to browse a commit is... less than desirable.  Should be an existing feature as it seems simple.

Keith Robertson October 30, 2023

Amen to that! I've been looking for this feature for years. It's absurd that this is so painful.

2 votes
C Bogdan
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 23, 2020

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events