Non-merged branches appear in the merged category
Platform Notice: Cloud - This article applies to Atlassian products on the cloud platform.
Summary
In Bitbucket cloud, the calculation of merged vs active branches is done by considering the default branch (not by the creation time), any branch that shares history with the repository's master / main branch but is ahead of the repository's master branch by any commits that are not yet present within the master branch is considered an active branch and any branch which is not ahead of master, which means that the changes of the branch is already present in the master is considered as merged branch.
- Merged branch - 0 commit ahead of master i.e. master is updated with the changes of the branch
- Active branch - all branch are 1 commit ahead of master i.e. master is lacking the changes of the branch
To conclude, branches are listed in merged or active branch list depending on the commits being ahead of master branch or not.
Cause
Due to this, if there is a new branch created from a merged branch which is not even merged by the user still shows up on the merged branches list.
We also have an existing feature request to have a feature for better differentiating between the branches.
- BCLOUD-23159 - Additional branch type to better differentiate between the un-merged branches.