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

Possible bug with branch names and case sensitivity

From
GKGerd Knops <gerti@bitart.com>
Date
Nov 19, 2011, 20:08 UTC
Message-ID
<D144F6C9-C6A3-4516-BC88-B9EB50890EF4@bitart.com>
Hi All,
On Mac OS X with a case-insensitive file system (not sure if that matters) git get's confused with branch names that differ only in case. Here is what happened as far as I can reconstruct:
While in a branch named "foundry" I accidentally
	git checkout Crucible
instead of "crucible". This appears to have made a local branch "Crucible" of the remote tracking "crucible" branch (had I done this on purpose, I would have expected "Crucible" to be a branch of "foundry" instead of a branch of "crucible").
I made some changes, committed, and pushed, only to be puzzled that no changes were pushed upstream.
At this point "git branch -a" showed:
	* Crucible
	  foundry
	  master
	  remotes/origin/DAExceptions
	  remotes/origin/HEAD -> origin/master
	  remotes/origin/centerSectionOptimizer
	  remotes/origin/crucible
	  remotes/origin/foundry
	  remotes/origin/ipad
	  remotes/origin/master
So naturally I proceeded with
	git checkout crucible
	git merge Crucible
only to see "Already up-to-date."
Not sure if any of this is expected behavior, but to me it didn't feel like it.
Thanks
Gerd
PS: here is how I "fixed" this:
	git checkout Crucible
	git reset --soft HEAD^
	git stash
	git stash apply
	
added, committed, pushed. BTW now "git branch -a" shows:
	* crucible
	  foundry
	  master
	  remotes/origin/DAExceptions
	  remotes/origin/HEAD -> origin/master
	  remotes/origin/centerSectionOptimizer
	  remotes/origin/crucible
	  remotes/origin/foundry
	  remotes/origin/ipad
	  remotes/origin/master
No trace of the "Crucible" branch.
Next: Jay Soffian
Message 1 of 11 in “Possible bug with branch names and case sensitivity”
  1. Gerd KnopsNov 19, 2011
  2. Jay SoffianNov 21, 2011
  3. Michael HaggertyNov 22, 2011
  4. Jay SoffianNov 22, 2011
  5. Michael HaggertyNov 23, 2011
  6. Ævar Arnfjörð BjarmasonNov 23, 2011
  7. Joshua JensenNov 23, 2011
  8. Junio C HamanoNov 22, 2011
  9. Michael HaggertyNov 23, 2011
  10. Junio C HamanoNov 23, 2011
  11. Junio C HamanoNov 22, 2011

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.