Note: added here to find it much easier.

From git-config(1):

The -c flag can be used to set this option for one-off commands:

And the --global flag will make it be the default behavior for the logged in user.

Warning

core.fileMode is not the best practice and should be used carefully. This setting only cover the executable bit of mode and never the read/write bits. In many cases you think you need this settings because you did something like chmod -R 777, making all your files executable. But in most projects most files don’t need and should not be executable for security reasons.

The proper way to solve this kind of situation is to handle folder and file permission separately, with something like:

If you do that, you’ll never need to use core.fileMode, except in very rare environment.

 

Thanks to Greg Hewgill and Gleg on Stack.