Merging Two Git Repositories with branches
Posted
by
Joel K
on Server Fault
See other posts from Server Fault
or by Joel K
Published on 2011-01-15T03:09:00Z
Indexed on
2011/01/15
3:55 UTC
Read the original article
Hit count: 275
I realize there's a Stack Overflow question: http://stackoverflow.com/questions/277029/combining-multiple-git-repositories
But I haven't found git-stitch-repo to be quite the tool I'm looking for.
I also consider this more of a sysadmin task.
How do I take code from an external repository and combine it with code from a primary repository while maintaining history/diffs and branches.
Use case: An outside development team using SVN has ported to git and now wants to 'merge' their code in to the main company's git repo.
I've tried subtree merges, but I lose the history.
I've tried git-stitch-repo, but that process results in an entirely new repo that's missing branches.
I just want to slot in some outside code as a sub-directory in our current main repo with as little disruption as possible and while maintaining the other project's history.
Any success stories out there?
© Server Fault or respective owner