2 ms·
Yeah I do this on a daily basis. Sometimes I want to have two different branches open simultaneously. Maybe there’s some fancy git hackery to have two open work
by adastra22 3y ago
Yeah I do this on a daily basis. Sometimes I want to have two different branches open simultaneously. Maybe there’s some fancy git hackery to have two open workspaces from the same .git local repository. But you know what? My time to figure that out is worth more than the measly megabytes of saved disk space.
- erano 3y agoThe official way to do this is using git worktrees[0], but, as you say, it may not be worth the time to learn if what you have is working for you. [0] https://git-scm.com/docs/git-worktree https://git-scm.com/docs/git-worktree
- pdimitar 3y agoIt's not even only that, when you switch to another worktree you catch your language server with its pants down, and some tooling e.g. test watchers are bugging out as well. I just always found it cleaner to have several directories on the rare occasion I need to work on several branches almost in parallel. And let's face it, most of us don't work in a repo that is 100GB or above. Even if it was a 10GB I wouldn't care one bit and can easily have 20 copies of it temporarily.
- Cerium 3y agoLookup git worktrees. They are very easy to use and save you time since no matter how many you make you only need to fetch once. As an added bonus, someday you might be working on a project with 100gb repo and find that it makes a big difference.