Do I need to add a submodule folder in .gitignore?

Firstly, the folder is libsnot a submodule, we just copy it from another directory and put it in .gitignore, then we submodulate libs, do I need to delete libsfrom .gitignore?

+4
source share
1 answer
Submodule

git is smart enough to realize that a directory is a submodule and automatically ignores it in the right contexts.

You probably don't need to remove it from .gitignore, because it will be ignored anyway. On the other hand, it is no longer needed in .gitignore, so you can remove it. It should act the same in any case, but I would suggest deleting it (it looks more accurate and correct).

+2

Source: https://habr.com/ru/post/1667596/


All Articles