Re:Organization Probably Doesn't Want to Improve Things
by adastra22 on Saturday October 07, 2023 @11:28PM
(#37807648)
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.
[ Parent
| on HN ]
Re:Organization Probably Doesn't Want to Improve Things
by erano on Saturday October 07, 2023 @11:45PM
(#37807704)
The 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.
Re:Organization Probably Doesn't Want to Improve Things
by pdimitar on Sunday October 08, 2023 @08:47AM
(#37809978)
It'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.
Re:Organization Probably Doesn't Want to Improve Things
by Cerium on Saturday October 07, 2023 @11:50PM
(#37807727)
Lookup 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.