Background:
I am working on a new branch that I tried to commit, and had an error message I did not see before:
...
error: remote unpack failed: error The tree object 7232a9122ed3275af640aba1235dcc3c843c284f89da76 was rejected: The file 'FileWithCaseissue.cs' and the file 'FileWithCaseIssue.cs' pushed differ in case. You must remove or rename one of them or disable case-enforcement (see https://aka.ms/git-platform-compat)
...
When I checked the file Azure was complaining about, it was shown in the same case in Azure directly using the browser, as in the local repo.
What I found so far:
To analyze the issue I used the tree object id of the error message and had a look at it with
git show and it showed me something like this:
tree 7232a9122ed3275af640aba1235dcc3c843c284f89da76
FolderName/
SomeFile.cs
AnotherFile.cs
FileWithCaseIssue.cs
FileWithCaseissue.cs
SomeOtherFile.cs
Both case variants of the error message are listed, but I was, until now, not able to find or delete the second file that seems to be the issue.
To find the root cause, I then cloned the repo from Azure in a fresh folder, and checked again the tree object with git show, and got the same output...
I switched the "check case" on in Azure myself, and would like to leave it checked, as I would prefer to fix the issue, to avoid future issues.
Does anybody have a suggestion how I could analyse further or even better fix the issue, as I already spent much too much time working on it?
Edit:
- We are working on Windows
git config --get core.ignoreCasereturns "True" on the local repo- Azure repo is set to "Case enforcement on"
Had a similar issue, none of the config option worked so I ended to make a copy of the file, outside the repo, then committed deleting the file, moved again in his original path then commited again.
you can rewrite history to "hide" the issue (if you have any CI binded you might think about temporary disable it since it won't build having a missing file)