2 ms·
I usually just clone the same repository multiple times for each branch I'm working on simultaneously, but obviously that's cumbersome if it's very large so wor
by cozzyd 1y ago
I usually just clone the same repository multiple times for each branch I'm working on simultaneously, but obviously that's cumbersome if it's very large so worktrees are a good option there
- john01dav 1y agoYou can do clone from an existing clone: $ git clone git@whatever.com/... Cloning into example $ git clone example example-2 This works even if you made uncommitted changes in your first clone. These uncommitted changes aren't copied. You can also check out an origin branch to not work with locally commited changes. You can use git remote to set the new origin to upstream. Or, you could use worktrees. That's fine too.
- 1718627440 1y agoWhen you are cloning a repo on a local machine, git by default makes hardlinks, so a clone shouldn't be that different from a worktree.