Git global core.fileMode false overridden locally on clone

Reading this , I was able to configure both globally and locally the fileMode configuration to false.

However, when I git clone , git saves the initialization of projects with local configuration, force fileMode true , so that it overrides my global false . As a result, for each project I have either to delete the local configuration, or set it to false manually, which completely loses the meaning of the global configuration.

How can I prevent git from installing by default for each project, is this configuration local? Is this related to another configuration variable? On server?

+6
source share
2 answers

Clone, like init, always sets the local core.filemode when creating a new repository. See my answer to this question for more details. The only way to clone a local setting after the clone has to do it manually (for example, having a wrapper command that makes the clone, then goes into the clone and remove the setting).

+3
source
 git clone --config core.filemode=false YOUR_REPOSITORY 

for more information, see the git clone usage information or just type:

 git clone 

no argument

+3
source

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


All Articles