Broshi Broshi - 8 days ago 6
Git Question

Git duplicate file entry?

I changed the

ignorecase
value on git config to
false
but now when I edit I file and check the status, git tells me that two files were modified though its actually the same file:

modified: ACFCache/AcfOptionsPlant.php
modified: AcfCache/AcfOptionsPlant.php


How can I make git forget the
ACFCache
entry?

Answer

From reading this question I believe the following would have worked for you at the beginning, without even setting ignorecase to false:

git mv ACFCache tempname && git mv tempname AcfCache
git add .
git commit -m 'Changed folder name'

Now, you might try the following:

git checkout -- ACFCache/AcfOptionsPlant.php
git stash    # save changes to AcfCache/AcfOptionsPlant.php ONLY
git mv ACFCache tempname && git mv tempname AcfCache
git stash apply
# carry on as you were

I think you can go back to being in ignorecase mode in true:

git config core.ignorecase true