Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to prevent 'wrong' merge after checkout?

Michael Sparer April 27, 2014

I'm using Sourcetree v1.8.1 and git 1.8.5.2 under OS X 10.9.2. and was wondering how there could be "Uncommited changes" right after checking out a branch from a remote repository. Then I found out that the remote repository has two files in it JavascriptBehavior.java and JavaScriptBehavior.java, my cloned repo however contains only one file (JavascriptBehavior.java). This is because git performs an automatic merge of the two files on checkout and displays the merge as uncommited changes.

I tried to solve this by setting core.ignorecase to false in my global git settings and switching to system git in Sourcetree but to no avail. Is there any way to make Sourcetree respect the core.ignorecase setting, or is there an easier/better way?

1 answer

1 accepted

1 vote
Answer accepted
Seth
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 27, 2014

This is not a Git issue, but an OS issue:

http://apple.stackexchange.com/questions/22297/is-bash-in-osx-case-insensitive

If your filesystem doesn't allow two filenames that are identical except for case, Git has to either not check out one of the files, or merge the files.

Go yell at whichever Linux dev created/named those files, and have him change it so developers on Mac and Windows can use the repo.

Michael Sparer April 27, 2014

It is indeed an OS issue that I was hoping to be able to workaround using the core.ignorecase setting, as I was under the wrong impression that my file system is case-sensitive... I'd rather yell at the Apple developer who chose to make it case-insensitive (but obviously case-preserving) than at the Linux dev ;-) Cheers anyway for answering my question!

Seth
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 27, 2014

It'd be great if case-sensitive filesystems were standard. Apple's implementation is still a step better than Windows, which is only usually case-preserving (in certain conditions it will convert an all upper filename to all lower).

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events