Git · Branches and integration
git worktree
Checks out another branch in a separate directory, so you can work without stashing.
Syntax
git worktree add <path> <branch>Example
Example
git worktree add ../hotfix main
More in this group
Learn this in the course
Reference pages are the quick answer. The course explains the why, shows the full example and ends with a challenge.