'' is already checked out at '' in git worktrees

后端 未结 6 788
被撕碎了的回忆
被撕碎了的回忆 2020-12-14 15:31

I started using git worktrees. It seems to work, but I\'m getting this error when attempting to check out a branch in the cloned worktree:

fatal: \'

        
6条回答
  •  我在风中等你
    2020-12-14 16:01

    If you really want you can bypass this check, either by directly modifying the ref in the respective HEAD file, or by recreating the branch with the same name with e.g. git checkout -B master origin/master

    As others have said, you need to know what you're doing though; branches are common to all worktrees, changing one in one worktree will immediately affect the status of your other worktree.

提交回复
热议问题