I was trying to make a commit when I noticed that there is a file in the working directory, that I didn't change and it has the wrong first letter in folder name:
Changes to be committed:
new file: "\txample/src/Example.Repository/Services/Authentication/IAuthenticationService.cs"
Changes not staged for commit:
deleted: "\txample/src/Example.Repository/Services/Authentication/IAuthenticationService.cs"
modified: Example/src/Example.Repository/Database/EquityOrder.cs <-- correct folder name
My "IAuthenticationService.cs" file was never changed, but still appeared in 'git status' and had the wrong folder name, which should be "Example" instead of "\txample".
I tried to discard changes to this file using 'git checkout HEAD -- filename'. When I used the wrong folder name (\txample) with 'git checkout', it didn't find that file, but using the correct folder name (Example) worked without error. But still, this file didn't disappear from 'git status'
I tried to list all the files in the tree, using 'git ls-tree' and found that a path with an incorrect folder name exists there.
While 'git status' shows that there is a change only to one file, creating a commit with this incorrect path deletes a ton of files and creates a ton of files in a pattern that I cannot understand.
create mode 100644 Example/src/Example.Repository/ReflectionHelpers.cs
.....
create mode 100644 Example/src/Example.Repository/ReflectionHelpers.cs
.....
create mode 100644 Example/src/Example.Repository/ReflectionHelpers.cs
.....
delete mode 100644 Example/src/Example.Repository/ReflectionHelpers.cs
... (same for other files)
I cannot really understand why this is happening and how this can be fixed. Thank you for your help in advance
OS is Windows 10, using Git Bash