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.
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):
Gotcha, thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Having to hack the URL to browse a commit is... less than desirable. Should be an existing feature as it seems simple.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Amen to that! I've been looking for this feature for years. It's absurd that this is so painful.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
the response is still helpful though the url changed a bit:
URL at commit:
https://bitbucket.org/[workspace_name]/[repository_name]/src/[commit_hash]
Url at branch
https://bitbucket.org/[workspace_name]/[repository_name]/src/[branch_name]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.