Broshi Broshi - 1 year ago 122
Git Question

Git duplicate file entry?

I changed the

value on git config to
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

Answer Source

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
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download