Force core.ignorecase to false by default

2,573 views
Skip to first unread message

david.no...@gmail.com

unread,
May 28, 2014, 10:55:34 AM5/28/14
to tortoise...@googlegroups.com
I want core.ignorecase to be false by default each time a clone is performed.

How do I make this happen?

Thanks,
David

ch3c...@gmail.com

unread,
May 28, 2014, 7:47:39 PM5/28/14
to tortoise...@googlegroups.com, david.no...@gmail.com
You can also set global config
git config --global core.ignorecase false

david.no...@gmail.com於 2014年5月28日星期三UTC+8下午10時55分34秒寫道:

david.no...@gmail.com

unread,
May 29, 2014, 10:56:01 AM5/29/14
to tortoise...@googlegroups.com, david.no...@gmail.com
I was hoping for a solution that set it to false by default when cloned. Otherwise, it's up to every developer to set it appropriately.

What sets it to true in the first place? I assume TortoiseGit is setting it to true behind the scenes. Is that correct?

Thanks,
David

Yue Lin Ho

unread,
May 30, 2014, 3:56:38 AM5/30/14
to tortoise...@googlegroups.com, david.no...@gmail.com
Hi David:

david.no...@gmail.com於 2014年5月28日星期三UTC+8下午10時55分34秒寫道:
I want core.ignorecase to be false by default each time a clone is performed.
How do I make this happen?
Thanks,
David 
On Wednesday, May 28, 2014 7:47:39 PM UTC-4, ch3c...@gmail.com wrote:
You can also set global config
git config --global core.ignorecase false
 david.no...@gmail.com於 2014年5月29日星期四UTC+8下午10時56分01秒寫道:
I was hoping for a solution that set it to false by default when cloned. Otherwise, it's up to every developer to set it appropriately.
What sets it to true in the first place?

Try to use git init --template option:

other ref:

But I think you still need to set template dir once for each OS or each user.
"--template" helps you only at the situation that you got few configs to be applied.
(Sorry, I never try it. :P )

I suppose that the best solution is there is a .gitXXX file in the root directory.
Something like .gitignore, .gitmodules, ...
The setting value will always follow with each cloned repository, since the config file is under versioned.
Unfortunately, AFAIK, no such file can be used.
 
I assume TortoiseGit is setting it to true behind the scenes. Is that correct?

I am afraid that the answer is NO.
TortoiseGit never touches core.ignorecase.
Therefor, you can't set that value via TortoiseGit, but only via CLI.

More information:

it says:

core.ignorecase
  If true, this option enables various workarounds to enable git to work better on filesystems that are not case sensitive, like FAT. For example, if a directory listing finds "makefile" when git expects "Makefile", git will assume it is really the same file, and continue to remember it as "Makefile".
  The default is false, except git-clone(1) or git-init(1) will probe and set core.ignorecase true if appropriate when the repository is created.


Yue Lin 

david.no...@gmail.com

unread,
May 30, 2014, 8:21:12 AM5/30/14
to tortoise...@googlegroups.com, david.no...@gmail.com
Thanks for the very informative reply!

I did try adding a config file to the template with core.ignorecase = false, but still ended up with it set to true after the clone. I think your quote of the core.ignorecase documentation fully explains why it's always set to true.

Ironically, the whole reason I'm even interested is that I encountered problems when using Git rename to change only the case of a file name. After doing that, committing the file fails if core.ignorecase = true. This appears to be an issue with Git.

I suppose the preferred method is to simply change the file name case directly in Windows, without using Git rename, but that seems more a workaround than a real solution.
Reply all
Reply to author
Forward
0 new messages