views:

35

answers:

1

I'm looking for a clean way to import one git repository from another, where both repositories exist on github. The two repositories are private, in case it matters.

The idea is that one repository represents one project and the other simply needs to use that project. It doesn't make sense to check in all the code from one repository into the other, since the two are conceptually different, more or less stand alone tools.

What's the easiest way to do this? thanks.

+2  A: 

Git submodules are the tool that's meant to handle this -- of course with private repositories you would need to be sure that everyone with read permission to repo B also has read permission to repo A, otherwise they won't be able to get a complete checkout.

hobbs