Allow merging unrelated histories in git rebase
When you want to rebase a branch keeping merge commits you pass the --preserve-merges flag. When you are merging unrelated history in git you need to pass the --allow-unrelated-histories flag. If you are doing git rebase --preserve-merges when an existing merge comes from an unrelated history, it fails: fatal: refusing to merge unrelated histories If you try git rebase --preserve-merges --allow-unrelated-histories it fails with: error: unknown option 'allow-unrelated-histories' Is there some other way to tell rebase to allow the merge? Edit: here is a minimal reproduction: https://github.com