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

Commit view not showing every branches

PRINCE Vincent November 27, 2023

Hello,

When going to a commit detail view, for instance

https://bitbucket.org/<org>/<repo>/commits/d3ac5299a1b8d53c03a5b4434

In the right panel, in branch section, I can see only one branch of the three branches that this commit includes, is there any reason and any workaround to display all of them?


image.png

Thanks by advance for any help,

Vincent

1 answer

1 accepted

0 votes
Answer accepted
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 28, 2023

Hello @PRINCE Vincent and welcome to the Community!

In git, branches are actually just a pointer to a commit, and this pointer moves as you commit to that branch. The commits don't store any information about the branch itself. The history is made by associating each commit to its parent.

For the branch section in the UI when you open a particular commit, it will show the branches where this commit is reachable from, except if this commit is already present in the main branch, which will then only show the main branch name.

In this case, could you share with us the output of the following command for the commit in question?

git branch -r --contains <commit hash>

This will present all the branches that contain the aforementioned commit. It would also help if you could share what branch is configured as the main branch in Repository Settings > Repository Details > Advanced > Main branch.

Thank you, @PRINCE Vincent !

Patrik S

PRINCE Vincent November 28, 2023

Ok, so yes indeed release/rail-v7.x.x is the only branch shown because it's the main branch for this repository.

 

Is there any reason for this filtering? As an integrator, I liked to see every branches for a commit in Bitbucket Server, quite surprising every differences between those two products (Cloud/Server) but I guess we'll have to get use to it ;)

 

ps: git branch -r --contains d3ac5299 lists every branches

origin/HEAD -> origin/release/rail-v7.x.x
origin/hardknott
origin/kirkstone
origin/release/rail-v7.x.x 

Like Patrik S likes this
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 5, 2023 edited

Hello @PRINCE Vincent ,

From a practical standpoint once the commit is on the main branch already (and will likely be disseminated out to other branches) it makes less sense to consider the commit as belonging to a specific branch.

However, I understand how having all the branch labels would help with your use case, so I went ahead and created a feature request with our development team : 

I encourage you to add your Vote there as it helps our product managers to understand the demand for the feature. You also have the option to set yourself as a watcher, so you will be notified by email whenever there's any update on that feature.

Thank you, @PRINCE Vincent !

Patrik S

Like PRINCE Vincent likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Upcoming Bitbucket Events