Chief Peter
Chief Peter

Reputation: 373

Nest Git repository in multi module maven project

I want to have a multi-module maven project which has for example the following structure.

+ parent
| - proj1
| - proj2   

Now I want to have for the modules parent, proj1 and proj2 an own git repository to manage them individually.

What is the best approach here?

Upvotes: 1

Views: 259

Answers (1)

VonC
VonC

Reputation: 1323115

Shall I create for the submodules (proj1, proj2) a repository and add them as submodules with git submodule add to the parent project and ignore them via .gitigore?

That would be the preferred approach (as I mentioned here), only if those projects have to evolve independently one from another.
And you don't have to modify your .gitignore file: no need to ignore those submodules.

Upvotes: 1

Related Questions