git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git may delete current branch on case insensitive file system (Mac)
@ 2025-08-15  9:50 Richard Carlsson
  2025-08-15 15:41 ` Junio C Hamano
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Carlsson @ 2025-08-15  9:50 UTC (permalink / raw)
  To: git

This was a fun one. I accidentally upcased the first letter of a
branch beginning with "d" instead of
upcasing the -d option as I had intended, with a surprising result
(Mac OS). Easily reproduced:

% git checkout -b dummy
Switched to a new branch 'dummy'
% git branch -d dummy
error: cannot delete branch 'dummy' used by worktree at '/Users/riccar/...'
% git branch -D dummy
error: cannot delete branch 'dummy' used by worktree at '/Users/riccar/...'
% git branch -d Dummy
Deleted branch Dummy (was c32dfb2).
% git log
fatal: your current branch 'dummy' does not have any commits yet

On Linux, you instead get

% git branch -d Dummy
error: branch 'Dummy' not found


        /Richard

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-08-19  8:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-15  9:50 git may delete current branch on case insensitive file system (Mac) Richard Carlsson
2025-08-15 15:41 ` Junio C Hamano
2025-08-19  8:15   ` Patrick Steinhardt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).