URL to Bitbucket Raw File without commits

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

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

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 Nov 10, 2016

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

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

2,048 views 1 5
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you