Hacker News new | ask | show | jobs
by rubyist5eva 1538 days ago
With Git I’m pretty sure you can literally just add a new remote to a completely unrelated repo, fetch it and then “merge” any branch from the other two into the new mono repo (ie. git checkout master; git merge other-remote/master). If all your projects are otherwise in a top level directory inside the monorepo this should merge cleanly and then can just live beside eachother in the checkout.
1 comments

You just need the `--allow-unrelated-histories` flag (the first merge) which git requires as a small sanity check.