# Git case-sensitivity bug

2 messages from 2018-05-10 to 2018-05-10. Participants: Cliff, Bryan Turner.
Thread: https://gitlist.dev/t/48461

## Cliff, 2018-05-10 19:46

Subject: Git case-sensitivity bug
Message-ID: <CAKsGxtUpu66fj=puTxioTwCrint+U83a3R-DPhx5gXKF8Phm3A@mail.gmail.com>
URL: https://gitlist.dev/e/CAKsGxtUpu66fj%3DpuTxioTwCrint%2BU83a3R-DPhx5gXKF8Phm3A%40mail.gmail.com

```
I believe I have discovered a bug with git tools.

If you create a git branch, you can refer to that branch with
case-insensitive alterations and it will track as the same branch.

If I create branch "test" I cannot then create branch "Test" because
the same name is already used.

However, git commands ARE case-sensitive, causing unspecified behavior!

If you create branch "test" and then run "git checkout Test" and then
run "git branch" it will list the branches "master" and "test" and
NEITHER ONE will be flagged * as the current branch! (It does not list
Test and does not show any branch as being the current branch)

As far as git is concerned... you're not on a branch! But you're
secretly on the "test" branch.

Also, I think this may cause further issues. Switching to "test" tells
me that I am 1 commit behind master, but switching to "Test" gives no
such message, and appears to want me to --set-upstream again, for the
same branch.

This is really bad behavior.

I'm on MacOS so this may be unique to the Mac version of git tools.

```

## Bryan Turner, 2018-05-10 20:09

Subject: Re: Git case-sensitivity bug
Message-ID: <CAGyf7-E3-0SiqweoX-uLotwcCcy5MSxG6Zh+DRo6zQPKqTQQpA@mail.gmail.com>
URL: https://gitlist.dev/e/CAGyf7-E3-0SiqweoX-uLotwcCcy5MSxG6Zh%2BDRo6zQPKqTQQpA%40mail.gmail.com
In-Reply-To: <CAKsGxtUpu66fj=puTxioTwCrint+U83a3R-DPhx5gXKF8Phm3A@mail.gmail.com>

```
Hey Cliff,

On Thu, May 10, 2018 at 12:46 PM Cliff <miliways@gmail.com> wrote:

> I believe I have discovered a bug with git tools.

> If you create a git branch, you can refer to that branch with
> case-insensitive alterations and it will track as the same branch.

This comes up on the list fairly often on the list. The most recent thread
is here:
https://public-inbox.org/git/d4d8d8208b6a41c380ecf20807763bcf@XCH15-05-02.nw.nos.boeing.com/

The replies to that thread explain the behavior, why it does what it does,
and why it hasn't been changed yet. It happens on case-insensitive macOS
filesystems and on NTFS on Windows.

Hope this helps!
Bryan Turner

```
