On Fri, Aug 15, 2025 at 08:41:40AM -0700, Junio C Hamano wrote: > Richard Carlsson <carlsson.richard@xxxxxxxxx> writes: > > > 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 > > Perhaps you want to opt into the reftable backend before everybody > else does? Because it does not store each reference (branches, tags > and their friends) as a file on the filesystem, it would sidestep > the above issue case-challenged filesystems has. Yup. The above issue is indeed one more limitation of the "files" backend and isn't really something we can fix. But the reftable backend should indeed solve the issue. You can create repositories with that backend by using `git init --ref-format=reftable`, and you can migrate an existing repository to the reftable backend by saying `git refs migrate --ref-format=reftable`. But note: you do need to have a recent version of Git (at least 2.45, but most recent is recommended). And other tools that use for example libgit2 may not be able to access the repository. There is a fully working backend for libgit2, but it still needs to get merged. Patrick