Warning: Some posts on this platform may contain adult material intended for mature audiences only. Viewer discretion is advised. By clicking ‘Continue’, you confirm that you are 18 years or older and consent to viewing explicit content.
Because you’d have to stash your modifications to be able to switch branch. The stash is a stack so very limited in what it can do (just push and pop). You might prefer to commit on a temporary branch instead. But you might also need some parts from your current modifications for the bug fix, at which point having it taken away on another branch or in stash won’t do. I would usually end up resorting to doing another checkout side by side anyway, and if I can make it a sparse checkout it’s even better.
Because you’d have to stash your modifications to be able to switch branch.
OP said nothing about stashing, only committing WIP commits to feature branches. I don’t think none of your remarks apply, because if you really need stuff from the WIP commits you can also cherry-pick them or checkout specific files.
If you find it more comfortable to keep swapping checkouts in the same dir that’s cool. I’m just explaining that some of use find it easier to keep several different checkouts around, and sparse checkouts are helpful when you do that.
Because you’d have to stash your modifications to be able to switch branch. The stash is a stack so very limited in what it can do (just push and pop). You might prefer to commit on a temporary branch instead. But you might also need some parts from your current modifications for the bug fix, at which point having it taken away on another branch or in stash won’t do. I would usually end up resorting to doing another checkout side by side anyway, and if I can make it a sparse checkout it’s even better.
OP said nothing about stashing, only committing WIP commits to feature branches. I don’t think none of your remarks apply, because if you really need stuff from the WIP commits you can also cherry-pick them or checkout specific files.
If you find it more comfortable to keep swapping checkouts in the same dir that’s cool. I’m just explaining that some of use find it easier to keep several different checkouts around, and sparse checkouts are helpful when you do that.
Fair enough.