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

git branch doesn't allow me to forcibly delete branch which was checked out in a now-deleted worktree dir

From
Erik Johnson <palehose@gmail.com>
Date
Jul 7, 2016, 18:44 UTC
Message-ID
<20160707184408.GA1916@gmail.com>

% git branch -D archive-extracted-xz error: Cannot delete branch 'archive-extracted-xz' checked out at '/home/erik/git/salt/archive-extracted-xz' % test -d /home/erik/git/salt/archive-extracted-xz || echo "directory doesn't exist" directory doesn't exist % git --version git version 2.9.0

I know that I can just get rid of this error by pruning the worktrees, but this still seems like incorrect behavior on the part of git branch. It shouldn't be telling me that the branch is checked out in a directory that does not exist, that is just factually incorrect.

--
-Erik

"For me, it is far better to grasp the universe as it really is than to persist in delusion, however satisfying and reassuring." --Carl Sagan

Next: Jacob Keller
Message 1 of 8 in “git branch doesn't allow me to forcibly delete branch which was checked out in a now-deleted worktree dir”
  1. Erik JohnsonJul 7, 2016
  2. Jacob KellerJul 7, 2016
  3. Erik JohnsonJul 8, 2016
  4. Jacob KellerJul 9, 2016
  5. Erik JohnsonJul 9, 2016
  6. Jacob KellerJul 9, 2016
  7. Erik JohnsonJul 9, 2016
  8. Duy NguyenJul 9, 2016

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.