0

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.

John
  • 1,178
  • 5
  • 20
  • 36
  • 4
    look into git submodules, read VonC answer here http://stackoverflow.com/questions/2896944/component-based-web-project-directory-layout-with-git-and-symlinks – guido Aug 28 '13 at 13:48
  • 1
    Yes, you can push from multiple repos into one destination, but I don't think it'll do what you are thinking. For one thing, you'll need to rename all branches that are common so they don't conflict. Second, the two repos will be essentially distinct history trees - you won't magically see the files from both projects in a checked out work tree unless you manually merge the two projects together in some way, and you would have to continually redo that every time you pushed again... – twalberg Aug 28 '13 at 14:38
  • What's about using repo ? – stdcall Aug 28 '13 at 18:47

2 Answers2

1

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.

Levi Haskell
  • 795
  • 8
  • 20
0

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.
Leonid Shvechikov
  • 3,927
  • 2
  • 17
  • 14