Cloning large JavaScript repositories (like Telerik/Kendo) over the network is notoriously slow, and dealing with massive node_modules folders makes manual copying a nightmare. Here is a breakdown of the best ways to duplicate a local repo to work on separate branches simultaneously.
If you want to work on two different branches at the same time in separate VS Code windows without constantly switching or stashing, git worktree is the native tool built exactly for this. It takes zero seconds, takes up almost no extra disk space, and completely ignores node_modules.
How to do it:
- Open your terminal in your existing repository folder (e.g.,
kendo).