I can\'t seem to get rid of untracked content in Git\'s submodules. Running git status
yields:
# On branch master # Changes not staged for commit: #
I got stuck on this issue yesterday, in a project which had close to 12 submodules.
git status
was showing output.
# On branch master
# Changes not staged for commit:
# (use "git add ..." to update what will be committed)
# (use "git checkout -- ..." to discard changes in working directory)
# (commit or discard the untracked or modified content in submodules)
#
# modified: proj1 (untracked content)
# modified: proj1 (modified content, untracked content)
# ...
To resolve the untracked content error, I had to remove the untracked files from all submodules (all were *.pyc
, *.pyo
files generated by python) using a .gitignore
.
To resolve the other, I had to run git submodule update
which updated each of the submodules.