'Warning: Multiple merge bases detected. The list of commits displayed might be incomplete

In Azure Repos, I have created a PR from branch A to branch B. There are no merge conflict displayed. But I end up with the warning message

Warning: Multiple merge bases detected. The list of commits displayed might be incomplete.

screenshot of error



Solution 1:[1]

I got the same message today. I just pulled the latest changes from the destination branch and merged them in the source branch and the issue was resolved.

Solution 2:[2]

Just take the latest changes of destination branch to source branch and complete the merge, after that this message will not come up on the pull request page.

In my opinion, this is good that Azure DevOps is giving such a warning so that if you forgot to take the latest from the target branch before finishing your pull request and it may save some time or end moment rush & surprise.

Solution 3:[3]

If I am correct, this warning is useless, because DevOps has also a feature to detect merge conflicts. And I am getting this warning no matter if there are any conflicts or not enter image description here

If there are merge conflicts detected, then I get this one:

enter image description here

So I would say the proper way to handle merges is by automatic build pipeline, not a warning that confuses everybody.

Solution 4:[4]

Had this happen to multiple teammates today. It was occurring because they were about to merge a PR into our main branch before merging that main (remote) branch into their (local) branch first. Their local branch was several commits behind.

Once they merged, committed, and pushed, the message disappeared.

Solution 5:[5]

I've found i get the message when i pull updates from another branch into the branch i'm trying to merge(Update dev branch from master and then PR merge back into master for example).

I've also found this when i've forgotten to pull down changes before pushing updates.

Solution 6:[6]

This can sometimes happen if your merge is set to "fast-forward" when you have more than one branch implicated, as per the message.

If there are no other conflicts (check Conflicts tab) then you can probably allow the merge to Complete, by selecting (from "..." menu) Restart Merge, then choosing the non fast-forward merge option.

Solution 7:[7]

Take this warning seriously. This happens either

  • When your source branch don't have the latest of destination branch and you have created the Pull Request.
  • Or you have merged the a branch which is not the origin of your current branch. enter image description here

For reason first: Take your branch to local, merge the origin of destination branch to your branch, commit and push. check the PR now, it must be resolved now. If not, then you must check the second reason.

For reason second: When you have pushed a branch to your current branch which is not the origin of your current branch.

  • Best solution, if feasible in your case, identify the branch which was not the origin of your branch and revert the commit and push it.
  • If not, then create a new branch from the origin of destination, cherry pick all the commits which are relevant and commit push. Create a new PR from this new branch.

Choose the option based on your feasibility.

Solution 8:[8]

Me and my colleague had the same issue using Azure DevOps, his branch was behind, all we had to do was:

git pull origin master

from his local branch, this fixed it

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Jorn.Beyers
Solution 2 JARVIS
Solution 3 Juri
Solution 4
Solution 5 newky2k
Solution 6 MikeW
Solution 7 KushalSeth
Solution 8 DrFaraday