How can I set a default config for cloned repositories? Is this possible, or is the config somehow stored in the repository?
Context:
- I have set the global config
core.filemode = false
- I create an empty repository on GitHub. (i.e. I expect no ‘forced’ or ‘non-default’ config overrides)
I execute git clone https://<repository>
I inspect ./<repository>/.git/config
Expected
the config file should not contain core.filemode
, or have core.filemode = false
since this is what I configured globally.
Actual
The clone doesn’t follow my global setting:
$ git config --global core.filemode
false
$ head -n 3 .git/config
[core]
repositoryformatversion = 0
filemode = true
$
Is there a reason why the clone is overriding my global setting? Is it GitHub? Is there a way to remedy this?