Reputation: 373
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?
git init .
starting from the submodules (proj1, proj2) the repository for each module? git submodule add
to the parent project and ignore them via .gitigore
?Upvotes: 1
Views: 259
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