Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
    
have you looked at git submodules, and if yes, why do you find them lacking ? –  huitseeker Jan 15 '11 at 9:11
    
I need to add some files to a directory that already exists. sub modules seem to only accommodate /subdirectories/ of the 'super' project. I want to truly merge, not just link to another reference. After more investigation I'm being told this is a fundamental bug in how githandles filenames and directory moves... –  Joel K Jan 19 '11 at 1:38
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.