Is it possible to add/initiate a new git submodule with the ignore option set to a certain value?
I have a script that sets up a project for me and my co-workers.
We are using git submodules inside our repository. The script I’ve made creates untracked config files inside the submodules’ directories (cabal’s sandbox config files to be more specific). I’m never going to modify the submodules, will never push any changes. I would like for those config files not to be listed as modifications to the repository, so I ignore them with the submodule option
ignore = untracked. However, I have to do that manually for each submodule entry in the
The question at hand: is it possible to set that option per submodule when calling
git submodule add or
git submodule init? If not, is there any git command that would allow me to set such a config variable per-module after initialisation?
One Solution collect form web for “Is it possible to add/initiate a new git submodule with the ignore option set to a certain value?”
According to the docs there is no such option available for the
However there is a
git config command that allows setting that config option per submodule:
git config submodule.full/submodule-name.ignore untracked