'git worktree repair' can't repair when main and linked worktrees are moved
- From
Philippe Blain <levraiphilippeblain@gmail.com>
- Date
- Dec 4, 2020, 23:14 UTC
- Message-ID
- <63AC7AC2-5D32-479B-BF9E-0E5C31351A1B@gmail.com>
Hello,
I've had to move all my Git clones to a new filesystem. Several of them use secondary worktrees, and all are at the same level ex:
$ ls code git git2 git3 other other2 other3 ...
I had hoped to use the new 'git worktree repair' command but it seems it does not work for this use case.
I tried several things:
( cd git && git repair ) ( cd git && git repair ../git2 ) ( cd git && git repair /old/path/to/old/filesystem/git2 ) ( cd git2 && git repair /old/path/to/old/filesystem/git2 ) ( cd git2 && git repair ../git )
None of them work. Note that /old/path/to/old/filesystem/ does not exist anymore.
Is this supposed to work ? Or it's not something that 'git worktree repair' can currently cope with ?
P.S. I know how to repair the worktrees manuallly, I just wanted to test if 'repair' could help me.
Cheers,
Philippe.