This is a follow-up on this question on creating branches.
It strikes me as odd that I would still work on one repository because the files on my local machine will be a
With Git 2.5+ (Q2 2015), Git is no longer designed to work within a single folder (ie a single working tree)
Git will support multiple working trees (for one cloned git repo) with the new command git worktree add
.
That replaces an older script contrib/workdir/git-new-workdir
, with a more robust mechanism where those "linked" working trees are actually recorded in the main repo new $GIT_DIR/worktrees
folder (so that work on any OS, including Windows).
You will be able to checkout different branches in different path while being part of the same main cloned repo.
See more at "Multiple working directories with Git?"