git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Bug in `git branch --delete main` when on other orphan branch
@ 2022-10-29  5:46 Martin von Zweigbergk
  2022-11-01 10:15 ` Jeff King
  0 siblings, 1 reply; 12+ messages in thread
From: Martin von Zweigbergk @ 2022-10-29  5:46 UTC (permalink / raw)
  To: Git Mailing List

Hi,

I did this:
git init test
cd test
echo a > file
git add file
git commit -m a
git checkout --orphan other
git branch --delete main

The last command fails with:
fatal: Couldn't look up commit object for HEAD

That's a bug, right? I can of course work around it with `rm
.git/refs/heads/main`.

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

end of thread, other threads:[~2022-11-06 22:22 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-29  5:46 Bug in `git branch --delete main` when on other orphan branch Martin von Zweigbergk
2022-11-01 10:15 ` Jeff King
2022-11-01 15:31   ` Martin von Zweigbergk
2022-11-01 20:12   ` Taylor Blau
2022-11-01 20:14     ` Bug in `git branch --delete main` when on other orphan brancht Taylor Blau
2022-11-01 21:45       ` Jeff King
2022-11-02  0:59         ` Taylor Blau
2022-11-01 20:32     ` [PATCH] branch: gracefully handle '-d' on detached HEAD Taylor Blau
2022-11-02  5:27       ` [PATCH v2] branch: gracefully handle '-d' on orphan HEAD Jeff King
2022-11-04  1:26         ` Rubén Justo
2022-11-04  5:36           ` Jeff King
2022-11-06 22:22             ` Rubén Justo

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).