0

I have 2 files with the same name in my remote repository.

Say:
1. abc.txt
2. ABC.txt

In my local checkout, I can see only 1 file.
By changelist I mean un-comitted changes.
Now, somehow in my develop branch, the default changelist shows just 1 file, only abc.txt. If I revert this file it becomes ABC.txt then on reverting again it becomes abc.txt. Same thing happens on pulling/rebasing.
When I checkout some other branch say, A or B then the default changelist disappears, but when I switch back to develop the file in default changelist starts showing again.
I want to get rid of this file showing in my changelist as it is blocking reset, rebase and merge operations.

I want to see both the files in my local.

Tricks applied so far:

  1. Revert - Simply changes the file name.
  2. Reset hard - The operation is successful but it changes only the file name.
  3. Delete and pull - Nothing happens at all.

**I have used both Intellij inbuilt tool and SourceTree.

Farrukh Chishti
  • 7,652
  • 10
  • 36
  • 60
  • 1
    You need to rename one of those files, or delete it. This will only fix the problem going forward, if you need to fix the existing commit(s) you need to rewrite history, again renaming or deleting one of those files. – Lasse V. Karlsen Jun 13 '17 at 11:19
  • 2
    You neglected to say which operating system you're on. – Lasse V. Karlsen Jun 13 '17 at 11:19
  • @LasseV.Karlsen: I am using Mac. Preserving history is not required. I simply wanna get rid of this changelist. But I can't rename or delete these files. – Farrukh Chishti Jun 13 '17 at 11:43
  • 2
    Case sensitive or insensitive file system? – Lasse V. Karlsen Jun 13 '17 at 11:44
  • @LasseV.Karlsen: I am not aware of that. Where should I check that? I do have remote repository access. – Farrukh Chishti Jun 13 '17 at 11:49
  • 1
    Disk utility I think but I'm pretty sure you have case insensitive. If you do you simply can't have both files on disk without renaming one of them. – Lasse V. Karlsen Jun 13 '17 at 11:53
  • @LasseV.Karlsen: In that case, the only option is to ask admin to delete one of the files. Thanks anyways. – Farrukh Chishti Jun 13 '17 at 11:56
  • 1
    Basically, the file system is the limiting factor here, folding the two files into one, if you create one file and then try to create the other the first one is overwritten. If you have case insensitive file system you can't get around this other than to make sure the names are different if you don't consider the case. The reason why git reset toggles between the files is that it first figures out which file is missing on disk and then creates that file, and at any one given time one of the files is missing. – Lasse V. Karlsen Jun 13 '17 at 12:16

0 Answers0