Thank you for filling out a Git bug report! Please answer the following questions to help us understand your issue. What did you do before the bug happened? (Steps to reproduce your issue) I was working on code as usual. I should note that the repo is big, so it’s not unusual for some git operations to take half a minute. Here is a simpler reproduction that worked on my machine. ``` mkdir g cd g git init git touch a git add a git commit -am "a" git checkout -b b ``` While the last command is being run, in a different terminal, run `git checkout -b B` I realized that I can do it manually, by just using cmd-tab, then enter. Finally, type `git branch` What did you expect to happen? (Expected behavior) I expect either: * to see an error message stating that `b` already exists * to see `b` and `B` in the list of branch. In any case, when both branches exists, which will be the case on system which were started with this "bug", I expect to see both branches listed. What happened instead? (Actual behavior) I was able to successively create both branches. The branch `b` is not listed. If I check it out, then `git branch` does not list a single branch as the current branch. What's different between what you expected and what actually happened? I expect that `git branch` always list me on a branch, and let me know of all existing branch. Anything else you want to add: First: I can’t reproduce with `git branch b` and `git branch B`, so I guess either `branch` is faster than `checkout -c`, or something else is done right there. I know that this race condition seems very contrived. In real life, the names were `bookmarkShome` and `bookmarksHome`. Obviously, both were supposed to be `bookmarksHome`, in camlCase. The first one was a typo. But that was the one git show, which was confusing. However, even if the repo is big and checking out a branch can easily take 30 seconds, I’m still not sure when I’d have two terminals creating branchs at the same time. Please review the rest of the bug report below. You can delete any lines you don't wish to share. [System Info] git version: git version 2.39.0.246.g2a6d74b583-goog cpu: x86_64 no commit associated with this build sizeof-long: 8 sizeof-size_t: 8 shell-path: /bin/sh feature: fsmonitor--daemon uname: Darwin 22.2.0 Darwin Kernel Version 22.2.0: Fri Nov 11 02:03:51 PST 2022; root:xnu-8792.61.2~4/RELEASE_ARM64_T6000 x86_64 compiler info: clang: 14.0.0 (clang-1400.0.29.202) libc info: no libc information available $SHELL (typically, interactive shell): /bin/bash [Enabled Hooks]