Git Worktree
git worktree lets you have more than one branch checked out at the same time, each in its own folder. All the folders share one repository, so commits made in one are seen by the others.
It is handy for a quick fix on another branch without stashing or committing your current work.
Check out hotfix in a new folder
git worktree add ../project-hotfix hotfix
Preparing worktree (checking out 'hotfix')
HEAD is now at d9b2715 Fix typos in index.html
git worktree list
/home/user/hello-world d9b2715 [main]
/home/user/project-hotfix d9b2715 [hotfix]
Remove a worktree when you are done
git worktree remove ../project-hotfix
git worktree list
/home/user/hello-world d9b2715 [main]