# Cygwin error?

2 messages from 2008-11-19 to 2008-11-20. Participants: nadim khemir, Andreas Ericsson.
Thread: https://gitlist.dev/t/16397

## nadim khemir, 2008-11-19 17:57

Subject: Cygwin error?
Message-ID: <200811191857.30793.nadim@khemir.net>
URL: https://gitlist.dev/e/200811191857.30793.nadim%40khemir.net

```
Hi, Given:

$ git pull
remote: Counting objects: 46, done.
...
Updating b80286d..a543dae
error: Untracked working tree file 'xxx.txt' would be overwritten by merge.


This is due to a rename of xxx.txt to Xxx.txt. I  understand that this is due 
to files being just case preserving on Cycwin/Win32.

The only I found was to remove the xxx.txt localy and do a pull. The 
interresting thing is that Xxx.txt is no present in my file system. I can 
check it out from HEAD though.

What did I missunderstood and do wrong?

Cheers, Nadim.

```

## Andreas Ericsson, 2008-11-20 08:57

Subject: Re: Cygwin error?
Message-ID: <49252669.7060304@op5.se>
URL: https://gitlist.dev/e/49252669.7060304%40op5.se
In-Reply-To: <200811191857.30793.nadim@khemir.net>

```
nadim khemir wrote:
> Hi, Given:
> 
> $ git pull
> remote: Counting objects: 46, done.
> ...
> Updating b80286d..a543dae
> error: Untracked working tree file 'xxx.txt' would be overwritten by merge.
> 
> 
> This is due to a rename of xxx.txt to Xxx.txt. I  understand that this is due 
> to files being just case preserving on Cycwin/Win32.
> 
> The only I found was to remove the xxx.txt localy and do a pull. The 
> interresting thing is that Xxx.txt is no present in my file system. I can 
> check it out from HEAD though.
> 
> What did I missunderstood and do wrong?
> 

You ran into a corner-case. Git expects the "Xxx.txt" and "xxx.txt" to be
different. Cross-OS projects should never, ever rename files so that they
end up with case ambiguity. Since they did, the only thing you can really
do is this:

git fetch
rm xxx.txt
git reset --hard origin/master; # or whatever branch you're interested in

I'm afraid you'll have problems with this until all the branches you're
interested in have this change.

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

```
