Changes to git submodule commit fall under submodule instead of main project

Answered

When I make changes to a submodule, I can commit and push those changes to the submodule from the built in VCS as expected.

But when changes are committed, the submodule is on a different commit than before. That, in itself, is a change to the submodule that has to be committed and pushed to the main project.

However, when grouping changes by repository, the change to the commit the submodule is on, shows up under the submodule instead of the main git repo.

In this example, Interface is a submodule, contained by the repository st_newgui:

Is this expected behaviour? And if so, why?

3 comments
Comment actions Permalink

What type of the VCS are you using, what's the version of your IDE and JDK?

0
Comment actions Permalink

Using the built-in git in CLion 2020.1 RC

0
Comment actions Permalink

It's a known issue - https://youtrack.jetbrains.com/issue/IDEA-203694

As a workaround, you could disable grouping - this way submodules should be committed correctly.

0

Please sign in to leave a comment.