I need to run the command:
git config core.filemode false
The problem is that I have a few projects with at least ten submodules each. For some reason, all the submodules have that value set to true so I would have to remove/update that config manually.
Is there a way to tell Git to set a config value to all submodules?
Or remove it from the submodules so that the containing repo's settings are not overwritten?
You can use the git submodule foreach
command for this: https://www.kernel.org/pub/software/scm/git/docs/v1.6.1.3/git-submodule.html
You can provide an arbitrary shell command as a parameter, in your case something like this:
git submodule foreach --recursive git config core.filemode false
This will execute git config core.filemode false
in each of the submodules of the current Git repo.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With