1

I have a root folder with a git/ folder and one submodule (mymodule). mymodule has its own git/ folder, too.

git status shows:

# modified mymodule (untracked content)

Then I have removed a git folder from the submodule, and now if I change something in mymodule, it doesn't show with git status.

git add mymodule doesn't work.

All mymodule changes are untracked.

Michael Stalker
  • 1,357
  • 9
  • 15
Anton Barycheuski
  • 712
  • 2
  • 9
  • 21

1 Answers1

4

Submodules are different repos, so when you do a git add it doesn't track the changes in the submodules. The root repo only contains a reference to the submodule (mymodule). To commit all the changes you should cd into mymodule, commit the changes and push, then go into your root project and commit. This way the commit hash you have from mymodule will be included in the commit for your root project.

Michael Stalker
  • 1,357
  • 9
  • 15
Ethan
  • 6,883
  • 3
  • 33
  • 41