Push changed project structure into git

126 Views Asked by At

I have currently single project without modules in Git.
But now I do some changes and one of these changes is split project into maven modules and created maven inheritance.

Can you tell me please if can I simply push it into master branch or should I something extra do?
I wouldn't make mess in git with that push.

1

There are 1 best solutions below

0
On

The fact that your maven project shifts from a mono-module to a multi-module is of no consequence for a Git repo: you can still add, commit and push as usual, as long as your .gitignore is well configured: you would not want to add maven module target/ folders.

There is only an issue if you were to isolate those maven modules into their own Git repo, in which case a Git submodule approach might be needed.

But as long as you are talking about maven modules (which are a way of restructuring your sources), you can add them to your Git repo and push.