When creating a .gitignore file with this line:
it will ignore any file/dir named target anywhere in the repo. Meaning, this would also ignore /src/target/, a submodule, and all its content.
To resolve this problem, we should instead ignore the target dir on the top level:
and, if we want to make sure it's only ignored if a dir:
What do you think?