You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
R. Matthew Emerson edited this page May 8, 2018
·
1 revision
Worktrees
I often want to have multiple branches from a single repository checked out at the same time.
A git feature called worktrees allows this: you can have multiple working directories associated
with one git repository.
In the following example, ccl is a directory containing a clone of the ccl repository.
cd ccl
git worktree add -b my-branch ../my-branch-working-dir origin/master
cd ../my-branch-working-dir
# Hack as desired. When done:
rm -rf my-branch-working-dir
cd ccl
git worktree prune