How to use IntelliJ Git Submodule
I have a project with a submodule, both different git projects. Now as I understand from https://www.jetbrains.com/help/idea/2016.3/git-branches-in-multirooted-projects.html this should work with my setup.
No such luck though, IntelliJ does not recognize my submodule, even though it is listet in .gitmodules. One would think that was enough, but appearently not.
So what to do next? I have read on https://intellij-support.jetbrains.com/hc/en-us/community/posts/207052265-Multiple-git-repositories that I can add Git modules manually via File => Settings => VCS Control. Sadly, under "File" there is no such thing as Settings. There is Import Settings, Export Settings, Settings Repository and Default Settings, but no Settings. Oh Well...
Now I'm workung under OSX, so maybe what he is talking about are the Preferences, even though those are for the entire IDE as far as I understand, so it wouldn't make sense to put project settings there. I took a look and found nothing that might help me.
So please enlighten me, how can I add a submodule, that is already in my project and already in the .gitmodules file of the main project to IntelliJ in such a way that I can commit changes to the submodule to its repository, rather than the main projects repo.
Kind Regards,
Daniel
Please sign in to leave a comment.
There is no direct support of submodules yet, need to register them as a separate roots.
Please see https://youtrack.jetbrains.com/issue/IDEA-64024
To work with submodules you need to register each Submodule as a separate VCS root in Preferences - Version control.
This doesn't answer the question. Once you get to this page, how do you register the unregistered ones listed?
See https://stackoverflow.com/a/28996058/104891.
in EAP now !! https://blog.jetbrains.com/idea/2018/09/intellij-idea-2018-3-eap-git-submodules-jvm-profiler-macos-and-linux-and-more/