"Will not add the file alias" samefile "(" SameFile "already exists in the index)" when the `git add` operation

I download linux 'source code and want to git add all of them.

When I git add . , git begins to add them. But he soon returns an error:

 fatal: Will not add file alias 'include/linux/netfilter/xt_connmark.h' ('include/linux/netfilter/xt_CONNMARK.h' already exists in index) 

What is strange, xt_connmark.h and xt_connmark.h TOTALLY DIFFERER , why is he complaining about this error? These situations are found in other folders. I cannot just change their names separately to solve this problem.

Even I'm trying to git add --ignore-errors . This does not work either. He just stopped, not ignoring this mistake. Does anyone know a solution?

+8
git
source share
1 answer

Change .git / config to set ignorecase to false

 [core] ignorecase = false 

Can install globally

 $ git config --global core.ignorecase false 
+14
source share

All Articles