cygwin - How to configure default configuration for new Git repository? -
in following see git set ignorecase true default despite .gitconfig configuration.
$ mkdir foo && cd foo && git init initialized empty git repository in /cygdrive/c/users/nowox/home/git/foo/.git/ $ cat .git/config | grep ignore ignorecase = true how can tell git set ignorecase false default new repositories?
i have put config file in $git_template_dir (/usr/share/git-core/templates):
[core] ignorecase = false repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true but still doesn't work. seems config file erased git...
full example
~/test $ git init initialized empty git repository in /cygdrive/c/test/.git/ ~/test $ cat .git/config [core] ignorecase = true repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true ~/test $ cat /usr/share/git-core/templates/config [core] ignorecase = false repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true it looks doesn't work. both config files different:
~/test $ diff /usr/share/git-core/templates/config .git/config 2,5c2,5 < ignorecase = false < repositoryformatversion = 0 < filemode = true < bare = false --- > ignorecase = true > repositoryformatversion = 0 > filemode = true > bare = false it same if declare git_template_dir variable:
~/test $ rm -rf .git ~/test $ git_template_dir=/usr/share/git-core/templates git init . initialized empty git repository in /cygdrive/test/.git/ ~/test $ cat .git/config [core] ignorecase = true repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true
see template directory of git-init.
by default, when initialize new git repo, contents under /usr/share/git-core/templates copied new repo's .git. can make template config here, includes
[core] ignorecase = false for git-bash-for-windows, it's /mingw64/share/git-core/templates/ or /mingw32/share/git-core/templates/.
besides manual says, have folloing options specify templates.
- the argument given
--templateoption; - the contents of
$git_template_direnvironment variable; - the
init.templatedirconfiguration variable.
Comments
Post a Comment