git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Bug: Git checkout case Insensitive branch name compare

From
KRkinchit raja <kinchit15@gmail.com>
Date
Jul 10, 2017, 20:15 UTC
Message-ID
<CAKvSMhhO7RwiZfpcLR3cK2TXF-v9MrO1N33t8BqX=8f9z=Gd0w@mail.gmail.com>
Bugs Details:
Git checkout case Insensitive branch name compare
Steps to Reproduce:
 I have a remote branch which is as shown below.
Example: feature_12345_write.netCodeForSomeFeature
 I used the git command on git bash and typed
"feature_12345_write.NetCodeForSomeFeature" thinking I am mapping
"feature_12345_write.netCodeForSomeFeature" locally.

So after I got the branch locally, I tried git pull and I see the following "Your configuration specifies to merge with the ref 'refs/heads/feature_12345_write.NetCodeForSomeFeature' from the remote, but no such ref was fetched.

 Although when I did "git log", it shows proper history for
"feature_12345_write.netCodeForSomeFeature" branch.

However when I use the command "git pull --rebase origin branch" it says "fatal: Couldn't find remote ref feature_12345_write.NetCodeForSomeFeature" Because the remote branch has 'n' instead of 'N' in '.net' for branch name.

This is because I used "git checkout branch" instead of "git checkout branch origin/remote branch name" since the local branch name I wanted was the same as the remote branch name.

I don't see this in other branches.

I think the command is not considering case sensitivity of characters in the branch name.

Thanks.
-- 
Best Regards,
Kinchit Raja
Next: Jeff King
Message 1 of 2 in “Bug: Git checkout case Insensitive branch name compare”
  1. kinchit rajaJul 10, 2017
  2. Jeff KingJul 11, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.