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

Re: git branch -D doesn't work with deleted worktree

From
Jacob Keller <jacob.keller@gmail.com>
Date
Jan 10, 2017, 05:08 UTC
Message-ID
<CA+P7+xqOrRwJsnskfGQpLYyQFjce=4z24zuhrEBd2P4gBLh0Qw@mail.gmail.com>
In-Reply-To
<CACsJy8AfcZOR966ypfbZa1+7=tr2RVxPUk8+XmQkGeoMBJ7Z0g@mail.gmail.com>
On Mon, Jan 9, 2017 at 2:07 AM, Duy Nguyen <pclouds@gmail.com> wrote:
Show 14 quoted lines
> On Mon, Jan 9, 2017 at 10:44 AM, Jacob Keller <jacob.keller@gmail.com> wrote:
>> Why not just update the documentation to be "when you are done with a
>> work tree you can delete it and then run git worktree prune"?
>
> The document does say that (a bit verbose though):
>
> When you are done with a linked working tree you can simply delete it.
> The working tree's administrative files in the repository (see
> "DETAILS" below) will eventually be removed automatically (see
> `gc.worktreePruneExpire` in linkgit:git-config[1]), or you can run
> `git worktree prune` in the main or any linked working tree to
> clean up any stale administrative files.
> --
> Duy

Right, so maybe we can make it more clear since it's not quite as simple as "deleting the work tree" because of stuff like stale branches.. or would it be worth re-scanning worktrees when we do branch deletion? (obviously ignoring the ones that are marked as on removable media)

Thanks, Jake

Previous: Duy NguyenNext: Duy Nguyen
Message 6 of 7 in “git branch -D doesn't work with deleted worktree”
  1. Roland IlligJan 5, 2017
  2. Stefan BellerJan 5, 2017
  3. Duy NguyenJan 6, 2017
  4. Jacob KellerJan 9, 2017
  5. Duy NguyenJan 9, 2017
  6. Jacob KellerJan 10, 2017
  7. Duy NguyenJan 10, 2017

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.