From: Eric Sunshine Date: Fri, 02 Mar 2018 11:40:08 GMT Subject: Re: Worktree silently deleted on git fetch/gc/log Message-ID: In-Reply-To: On Fri, Mar 2, 2018 at 6:34 AM, Дилян Палаузов wrote: > Your assumption is correct: when renaming the directory apparently I have > not adjusted /git/A/.git/worktrees/B/gitdir to the new location. > > I fixed the situation by renaming /git/B to /git/B.bak, creating a new > worktree pointing to /git/B (with branch g), then deleting /git/B and moving > /git/B.bak to /git/B . Duy's patch series to add a "git worktree move" command[1] should help avoid such problems in the future. [1]: https://public-inbox.org/git/20180124095357.19645-1-pclouds@gmail.com/