Git refusing to merge unrelated histories on rebase

Created by blue112Linked to 31.2m issues across 137 teams

tl;dr

Git 2.9 introduced a change to the default behavior of the git merge command, which now prevents merging two branches that have no common base. This is to avoid creating a new history of an existing project and then having it pulled by an unsuspecting maintainer, which would result in an unnecessary parallel history being merged into the existing project.

If you need to merge two branches with no common base, you can use the --allow-unrelated-histories option. This will force the merge to happen.