git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Thoughts on the "branch <b> is not fully merged" error of "git-branch -d"
@ 2024-09-07 16:28 Stefan Haller
  2024-09-07 16:59 ` Junio C Hamano
  0 siblings, 1 reply; 6+ messages in thread
From: Stefan Haller @ 2024-09-07 16:28 UTC (permalink / raw)
  To: git

I frequently get this error when trying to delete a branch that was
merged on github, and the remote branch was deleted through github's UI too.

When I then fetch and see that "git branch -v" shows it as "[gone]"), I
will want to delete it, but at that time it is pretty random which
branch I happen to have checked out. If it's some other unrelated branch
that I didn't rebase onto origin/main yet, or if it is main but I didn't
pull yet, then I get the error; but if I'm on main and I have pulled, or
I'm on an unrelated branch and I have rebased onto origin/main, then I
don't.

This feels arbitrary to me. It would seem more useful to me if the error
only appeared if the branch is not contained in any of my local or
remote branches, because only then do I lose commits. Any thoughts on that?

-Stefan

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

end of thread, other threads:[~2024-09-08  5:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-07 16:28 Thoughts on the "branch <b> is not fully merged" error of "git-branch -d" Stefan Haller
2024-09-07 16:59 ` Junio C Hamano
2024-09-07 17:08   ` Junio C Hamano
2024-09-07 18:51   ` Stefan Haller
2024-09-07 20:00     ` Junio C Hamano
2024-09-08  5:33       ` Stefan Haller

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