git worktree
Table of Contents
git worktree reference
# Basics
$ git fetch
$ git worktree add -b bugfix-1234 ../bugfix origin/master
# Temporary
$ git worktree add --detach ../project-build HEAD
# Cleanup
$ rm -rf ../bugfix && git worktree prune-b bugfix-1234option creates a new branch namedbugfix-1234../bugfixis the new local copy- Based on
origin/master --detachmakes the working copy detached. (Just commmit, not the branch)