git worktree

Manage multiple working trees attached to the same repository. More information: https://git-scm.com/docs/git-worktree.

git worktree add path/to/directory branch

git worktree add path/to/directory -b new_branch

git worktree list

git worktree prune