2

I would like to manage two separate repository to assemble a project. Repo A contains the platform, repo B contains plugins I'm developing. Something like this:

- files repo A
  -app
  -src
    -files repo B
  -...

I would like to manage repo B git inside the installation platform, but the commands

cd src
git remote -v

give me the origin branch of repository A. Is possible to nest two different repository without using submodules? My development repo is B, and A is a reference platform repo that I want to manage separately.

Alessandra
  • 467
  • 2
  • 6
  • 24

1 Answers1

0

Is possible to nest two different repository without using submodules?

The alternative to submodule is to use subtree.
See an example in "Apply gradle file from different repository".


But submodule remains the usual way to manage this case: However, B files will be in a B folder.

If your src folder only contains B files, then you could do a:

cd /path/to/A
git submodule add url/B src
Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • I'm developing under a platform developed with symfony so I would like to git only the bundles I'm developing. I don't know to start I have not a project under git, I need to put a subproject to git, I can create an empty remote repository but I don't know how to push only my bundles in that project... – Alessandra Sep 02 '14 at 14:36
  • Each submodule is its own git repo: you can start making sure your different repos are created. Then you can bring only the repo you need within a new parent repo with the `git submodule add` command that I mention. – VonC Sep 02 '14 at 14:49