TL;DR: you probably wanted git worktree add ../BRANCH BRANCH
But, really, it looks like this is the best option:
git worktree add ../PATH --checkout BRANCH
I don't have a good source on the solution that worked best for me (.e.g. --checkout). However, if all I want to do is to be in main, and then checkout a branch that a coworker/collaborator has created into a new worktree, then the --checkout form is best.
> TL;DR: you probably wanted git worktree add ../BRANCH BRANCH
But, really, it looks like this is the best option:
```
git worktree add ../PATH --checkout BRANCH
```
I don't have a good source on the solution that worked best for me (.e.g. `--checkout`). However, if all I want to do is to be in `main`, and then checkout a branch that a coworker/collaborator has created into a new worktree, then the `--checkout` form is best.
https://stackoverflow.com/a/45491767
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
I want to check out a remote branch into a worktree.
But, really, it looks like this is the best option:
I don't have a good source on the solution that worked best for me (.e.g.
--checkout). However, if all I want to do is to be inmain, and then checkout a branch that a coworker/collaborator has created into a new worktree, then the--checkoutform is best.https://stackoverflow.com/a/45491767