On Tue, 7 Feb 2017 23:37:26 -0800 (PST) "seonguk.baek" <[email protected]> wrote:
> After creating the bare git repository, check the config file as > follows. [core] > repositoryformatversion = 0 > filemode = true > bare = true > > I want to set always "filemode = false". > So, I edit /etc/gitconfig and ~/.gitconfig and create bare git > repository. But it's not working. > > How can I set this config? I observe the same behaviour with Git 2.11.1 on a GNU/Linux system with ext4 filesystem. To cite `git help config`: | core.fileMode | Tells Git if the executable bit of files in the working tree | is to be honored. | | Some filesystems lose the executable bit when a file that is | marked as executable is checked out, or checks out an non-executable | file with executable bit on. git-clone(1) or git-init(1) probe the | filesystem to see if it handles the executable bit correctly and this | variable is automatically set as necessary. | | A repository, however, may be on a filesystem that handles | the filemode correctly, and this variable is set to true when created, | but later may be made accessible from another environment that loses | the filemode (e.g. exporting ext4 via CIFS mount, visiting a Cygwin | created repository with Git for Windows or Eclipse). In such a case it | may be necessary to set this variable to false. | See git-update-index(1). | | The default is true (when core.filemode is not specified in | the config file). The latter point is moot but I interpret it this way: if the repository does not explicitly sets it to false in its configuration file, this setting defaults to true. I have also tried the standard way of overriding configuration Git options by spelling them explicitly -- git -c core.filemode=false init --bare foo.git and it did not work, too. Hence if you don't want to do an extra step like in git init --bare foo.git cd $_ git config --local core.filemode false then I'd ask on the main Git list for implementing an explicit command-line option like "--no-fs-filemode-probe" or discussing whether seeing -c core.filemode=false on the command line should make `git init` override its default. -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
