$ ./guess_the_languageGit
Git · medium · #43

Why does this command fail?

$ git worktree add ../wt main
fatal: 'main' is already used by worktree at 'D:/repo/app'
  1. The folder ../wt already exists
  2. Worktree paths must be inside the repository
  3. main is a protected default branch
  4. A branch can be in one worktree at a time
Git refuses to check out the same branch in two worktrees. Use another branch, -b <new>, or --detach.
Play Git ▸