How to prevent 'wrong' merge after checkout?

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

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.

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!

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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Tuesday in Uncategorized

Friday fun: how many celebrates Midsummer holiday or is this a Swedish tradition only?

Any other country that celebrates Midsummer holiday (this friday 22 June)?  

44 views 3 1
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you