Merge project/repos-b
in project/repos-a
in repos-b
subdirectory:
$ git clone git@example.com:project/repos-a.git
$ cd repos-a
$ git remote add -f repos-a git@example.com:project/repos-b.git
$ git merge -s ours --allow-unrelated-histories --no-commit repos-b/master
$ git read-tree --prefix=repos-b/ -u repos-b/master
$ git commit -m "Merge repos-b as our subdirectory"
$ git pull --allow-unrelated-histories -s subtree repos-b master
$ git push origin master