I noticed that in my directory there were two modules that had been Subprojects of my Git repository. That happened because I moved them all to one Git repo and those module
After suggestion I looked at this: un-submodule a git submodule
First tried:
git submodule deinit
After this it didn't change the old behavior. But when I did this:
git rm --cached yourSubmodule
Then it removed it as submodule and git started seeing those modules in main repository.