Reading this, I was able to configure both globally and locally my fileMode
config to false.
However, when I git clone
, git keeps initializing the projects with local config forced to fileMode true
, so that it overrides my global false
. As a consequence I have, for every project, to either remove the local config or set it to false
manually, which entirely lose the point of having a global config.
How can I prevent git from setting, by default, on every project, this config locally? Is that driven by another config variable? By the server?
Clone, like init, always sets a local core.filemode
when it creates a new repository. See my answer to this question for details. The only way to clobber the local setting after a clone is to do it manually (e.g., by having a wrapper command that does the clone, then goes into the clone and removes the setting). Or, as in tst's answer and Steve Benner's comment, add -c core.filemode=false
to your git clone
(be sure to put the -c
option after the verb clone
).
git clone --config core.filemode=false YOUR_REPOSITORY
for further information refer to the usage information of git clone, or just enter:
git clone
without any arguments
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