In my repository there is a file (always that one) that always gives me trouble.
I'm working with coffeescript and generating the js with a grunt task.
For several times git status told me that this file was modified and needed to be added. The problem is that git sees this file duplicated:

Ok..so I try to add everything with git add :/ and all the files are added, included ONE copy of AreaChart.js while the other one remains modified and unstaged. If I try to checkout or add it manually, nothing happens, its status remains modified and unstaged.
Is it a git bug? How can I fix this?
EDIT:
actually git sees the same file with 2 different file names, that is AreaChart.js and Areachart.js.
If I ls I only see AreaChart.js (uppercase C) as it is supposed to be.
HINT:
If I add AreaChart.js (uppercase C) --> git adds Areachart.js (lowercase c)
If I add Areachart.js (lowercase c) --> git adds Areachart.js (lowercase c)
EDIT2:
touch test and touch Test only one file is created (or maybe both but I can see only one of them) git config core.ignorecase says true Look again carefully
AreaChart.js
and
Areachart.js
are different files. One has capital C and other has lower case c character.
Since Git is case sensitive, and your filesystem is case insensitive, you will only see one of these on your filesystem. If you only want one in Git, you should remove the other, with git rm --cached Areachart.js, and make sure that your updates are added via git add AreaChart.js.
Get gets confused when it's on case-insensitive file systems. Try:
git mv --force Areachart.js AreaChart.js
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With