Thread (4 messages) 4 messages, 4 authors, 2025-11-17

Re: What is the reason behind not hiding git worktrees from git?

From: Johannes Schindelin <hidden>
Date: 2025-11-17 22:36:12

Hi Eric,

On Wed, 1 Oct 2025, Eric Sunshine wrote:
[...] There are plenty of people who already locate worktrees as
subdirectories of the main worktree[*] and do so without problem, and
for whom it is a preferred workflow, so I don't see why we would want to
penalize them by warning against doing so, especially since there is no
technical reason to avoid the practice (i.e. Git handles it just fine).
[...]

FOOTNOTES

[*]: There have been numerous emails on the list showing that placing
worktrees as subdirectories of the main worktree is common enough
practice. And, as far as "experienced users" are concerned (not just
novices picking up the practice from blogs or tutorials), I recall an
email discussion in which Dscho has said that he locates worktrees as
subdirectories of the main worktree, as well. I, too, have done so on
occasion.
And indeed I do, and continue to do so because the counter arguments in
that email discussion looked quite weak to me.

In the one instance where I heeded that well-meant advice to create
worktrees outside of my main worktree, I lost work when I had cleaned up
that main worktree after verifying with `git status` that there was no
unfinished business to take care of before deleting the repository.
Because that secondary worktree (which did contain unfinished business,
including a carefully crafted series of commits) was now obviously no
longer a worktree but only a tree without a working `.git`.

Ciao,
Johannes
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help