I\'ve added a submodule to my project in project_dir/vendor/submodule_one now each time I run git status I get modified: vendor/submodule_one
To add onto the accepted answer, I have found that adding the Git submodule folder to .gitignore actually causes issues - particularly when trying to create a fresh clone of the project. Specifically, running the normal submodule clone commands resulted in the submodule folder being empty:
git submodule init
git submodule update
git pull --recurse-submodules
Only by trying to re-run
git submodule add
it was clear what the issue was, based on the output:
The following path is ignored by one of your .gitignore files:
Use -f if you really want to add it.
Instead of adding -f, I removed the Git submodule folder from .gitignore and re-ran the submodule clone commands - which now successfully created the folder. I think that there may be a bug in that one of the submodule clone commands respects .gitignore but does not warn that it is skipping a submodule accordingly.