git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: bug report: spurious "cannot delete branch '%s' used by worktree"

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Mar 28, 2024, 17:24 UTC
Message-ID
<CAPig+cQWW1sLXyTBvk6D+1h15sZCtQO1opfhtFfiHr_kX0y82g@mail.gmail.com>
In-Reply-To
<CAEYvaskGHYrQgke=gf1sXYhrwbd+SeTpcjGF0fpxK3hQbyPFKg@mail.gmail.com>
On Thu, Mar 28, 2024 at 10:54 AM Tamir Duberstein <tamird@fuseenergy.com> wrote:
Show 7 quoted lines
> % git branch -d cleanup
> error: cannot delete branch 'cleanup' used by worktree at '<my source dir>'
> % git worktree list
> <my source dir>  dc46f6d5e [main]
> % git branch
>   cleanup
> * main

Is this error persistent once it arises? That is, if you invoke `git branch -d cleanup` again immediately after (or a little while after) the above sequence, does the problem persist? Or does it "clear up" on its own at some point?

Previous: Tamir DubersteinNext: Tamir Duberstein
Message 2 of 11 in “bug report: spurious "cannot delete branch '%s' used by worktree"”
  1. Tamir DubersteinMar 28, 2024
  2. Eric SunshineMar 28, 2024
  3. Tamir DubersteinMar 28, 2024
  4. Eric SunshineMar 31, 2024
  5. Tamir DubersteinMar 31, 2024
  6. Phillip WoodApr 2, 2024
  7. Tamir DubersteinApr 2, 2024
  8. Kristoffer HaugsbakkApr 2, 2024
  9. phillip.wood123@gmail.comApr 2, 2024
  10. Tamir DubersteinApr 2, 2024
  11. phillip.wood123@gmail.comApr 2, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.