We are tracking changes in a remote mercurial repository in a git repository. The situation is very complex – in mercurial, subdirectories are their own separate repo, but we have merged them all together for git.
We got this working once upon a time, and now we are trying to merge changes from the mercurial side with
git subtree pull -P <subdir> <path to hg gexport'd subdirectory> master
The result of that is git refusing to merge unrelated histories.
Now, if this were not a subtree pull, I believe adding –allow-unrelated-histories would fix it. But subtree is apparently too stupid to allow that.
This seems to have been asked before, but none of those answers seem to either make any sense or actually work.