Remote merge is not happening in Bitbucket Server

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。

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.

*Fisheye および Crucible は除く

問題

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"

原因

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.

ソリューション

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


説明 Remote merge is not working because the source and target branch don't match
製品
Bitbucket Server



Last modified on Mar 25, 2021

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.