Re: possible to checkout same branch in different worktree
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 15, 2016, 15:36 UTC
- Message-ID
- <xmqqk2jydgu8.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <CAJZYdzhG8h3s=Ep1fuGbam1cWhYkv0tW6tQ7pBGGj+fj6=Nrsw@mail.gmail.com>
Reto Hablützel <rethab.ch@gmail.com> writes:
Show 6 quoted lines
> the checkout command prevents me from checking out a branch in the > current worktree if it is already checked out in another worktree. > > However, if I rebase the branch in the current worktree onto the > branch in the other worktree, I end up in a situation where the same > branch is checked out twice in the two worktrees.
I agree that any end-user facing subcommand like "git rebase", even if it is not "git checkout", should refuse to work on and update a branch that is checked out elsewhere. Otherwise it will end up causing confusion.
Thanks for a report. The "multiple worktree" feature is still highly experimental and those who are working on it would appreciate your reporting issues with it.