John
John

Reputation: 1178

Push multiple Git repositories to one repository

I'm not sure if this is even possible. However, let me ask.

Can I push from multiple repos to a single repo? Essentially, I want the single repo to contain files from all the smaller repos.

I have repos created for various modules of my project. And the single repo is essentially the project itself.

Upvotes: 0

Views: 487

Answers (2)

Levi Haskell
Levi Haskell

Reputation: 853

As twalberg noted above, you can push from multiple repositories into a single destination, but that will create distinct history graphs. You can merge them though and even in keep sync with Git's help using what is call in Git a Subtree Merge, as described in http://git-scm.com/book/ch6-7.html. Take a look.

Upvotes: 1

Leonid Shvechikov
Leonid Shvechikov

Reputation: 3997

I suppose you are trying to implement SVN workflow but it is not possible with git.

There are two suitable approaches:

  1. If your project is going to be loose coupled with your modules — use separate repository for your modules, and install it as a separate python packages (usual plugin system, like django plugins).
  2. Otherwise — use a single repository for project and modules.

Upvotes: 0

Related Questions