Remote merge is not happening in Bitbucket Server

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform Notice: Server and Data Center Only - This article only applies to Atlassian products on the server and data center platforms.

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


DescriptionRemote merge is not working because the source and target branch don't match
Product
Bitbucket Server



Last modified on Mar 25, 2021

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.