Re: Worktree silently deleted on git fetch/gc/log
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Mar 2, 2018, 11:40 UTC
- Message-ID
- <CAPig+cRSMOUTQDA0NKNg_nx9HASmnqpFuyRjcSFjdKbVwAuvrw@mail.gmail.com>
- In-Reply-To
- <b34d74fa-f4c7-fb4a-49df-cd7ebd996d95@aegee.org>
On Fri, Mar 2, 2018 at 6:34 AM, Дилян Палаузов <dilyan.palauzov@aegee.org> wrote:
Show 6 quoted lines
> 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/