Assuming that the repository is at <path>/main, do something like this:
git worktree add -b <branch_name> ../<folder_name> HEAD
This puts a new directory next to main, but it is a checkout of a new branch. In this way, each branch gets its own directory. Now, switching branches is a matter of switching directories.
Git worktrees are great for this:
Assuming that the repository is at `<path>/main`, do something like this:
```
git worktree add -b <branch_name> ../<folder_name> HEAD
```
This puts a new directory next to `main`, but it is a checkout of a new branch. In this way, each branch gets its own directory. Now, switching branches is a matter of switching directories.
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.
When I'm switching between branches for development and reviews, I can get confused. Is there an easier way?
Git worktrees are great for this:
Assuming that the repository is at
<path>/main, do something like this:This puts a new directory next to
main, but it is a checkout of a new branch. In this way, each branch gets its own directory. Now, switching branches is a matter of switching directories.