The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

URL to Bitbucket Raw File without commits

mbreiden
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!
January 8, 2013

Hi,

I'm looking for a way to link to a file on bitbucket (always the latest version from master branch)

But I can only find urls which contain also the commit, which I can't use.

Any idea?

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

7 votes
Answer accepted
aMarcus
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 8, 2013

Hi Marcus,

You can replace the commit hash with the branch name. For example, I have a public repo at https://bitbucket.org/mbertrand80/public_test. If I click on the README of the repo on the sourcebrowser, I get a URL like https://bitbucket.org/mbertrand80/public_test/src/166a20379bc4/README?at=master. I can simplyswap the hash for the branch like https://bitbucket.org/mbertrand80/public_test/src/master/README.

Cheers,

Marcus

mbreiden
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!
January 8, 2013

almost correct... instead of src you can use raw... but looking at my question again I didn't made that clear.

Thanks for the fast answer.

Mike Howells
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 10, 2016

What if you know the tag (e.g. version) but not the branch?

Francis V Bishop
April 17, 2020

Like

Like Jack Furci likes this
Thomas Giesbrecht
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!
May 25, 2020

The branch format "feature/whatever" seems not working, not with "/" nor with "%2F". Is it possible to use such a format?

TAGS
AUG Leaders

Atlassian Community Events