2

I have branch A and branch B.

On branch A, I have a package with the name xyz and I change the package name to xYz. Next, I commit all of my changes and then switch to branch B. Now, once I switch to branch A, the package that I changed still has the value of xyz which is NOT what I committed. This happens in numerous cases.

The question: Does git ignore capitalization changes in file names or is this an issue on my part? I am using the SourceTree client if that helps.

1615903
  • 32,635
  • 12
  • 70
  • 99
Tamby Kojak
  • 2,129
  • 1
  • 14
  • 25

2 Answers2

10

You can try to set (as mentioned in the question "Git on windows: Can't switch branch after renaming a file (only changed case)"):

git config core.ignorecase false

And see if the issue persists.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • I ran this command committed my files and now I have two copies of everything in the repository and my local copy thinks its up to date. What a weird config setting. – kequc Feb 03 '16 at 02:23
  • @NathanLunde-Berry What version of Git are you using, on which OS? – VonC Feb 03 '16 at 05:52
  • @Nat do you reproduce the issue in a new clone of the same repo? – VonC Feb 03 '16 at 06:33
  • the repo looked fine it just had doubles. The old filenames and the new filenames, once I changed that setting. I resolved the issue by creating a new branch from within detached head mode and then switching back to master. – kequc Feb 03 '16 at 07:18
  • And then committing file deletions. – kequc Feb 03 '16 at 07:19
  • @NathanLunde-Berry OK. Never see that one before. – VonC Feb 03 '16 at 07:20
0

It does ignore on mac too. Move the file somewhere else, add to index and than commit. After that get the file back and commit. Capitalisation schould be fixed.

zavalit
  • 332
  • 2
  • 14