Git Feature - Multiple Checkouts

16 views
Skip to first unread message

tbp1...@gmail.com

unread,
Sep 22, 2021, 9:03:13 AM9/22/21
to leo-editor
Here's a Git feature I didn't know about - git worktree. Apparently you can check out different branches to different directories at the same time - 

  • Reply

    I do this all the time, except I use git worktree to have the same Git repository checked out in multiple folders.

    This saves me from having to have separate clones per branch, it's just one single repo clone checked out in multiple places.

    It also means that each worktree folder sees any other worktree folder's commits and references (since they're sharing the same .git folder) meaning that I only have to fetch once and all the worktree folders have all the commits available to them."

From, believe it or not, the Daily WTF.
Reply all
Reply to author
Forward
0 new messages