Remote merge is not happening in Bitbucket Server
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Problem
When merging a pull request remotely, the pull request is still open in Bitbucket and no remote merge is shown.
This is how to identify a remotely merged pull request:
the commit merge message says "<user> remotely merged the pull request from <source branch> to <target branch>
the status of the pull request is "MERGED"

Cause
Bitbucket will mark a pull request as remotely merged when the source and the target branch contain the same commits. This means that the commits (identified by the hash of the commit) must be present on both branches. If there is at least one difference, Bitbucket will not consider the branch has been remotely merged. Note: the diffs could be the same, what really matters here is the Git history of the two branches.
This usually happens when resolving the conflict via a rebase or a squash commit, in these cases the Git history will be different and the pull request will not be marked as merged.
Resolution
Depending on the goal, the following approaches are possible:
make sure that the conflicts are resolved in a way that allows the commits to be both on the source and the target branch. This will allow the remote merge to be completed.
use the required Git workflow by being aware that the remote merge will not complete
Was this helpful?