Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

git has had `switch` and `restore` for years now, they provide a more sensible interface than having `checkout` do so much.


I honestly never wrapped my head around the `git branch` and `git switch` commands and continue to use checkout for everything branch-related because it's what I've been doing since 2007. I haven't given them a fair shake, granted, but to me it's kind of like complaining that Unix's mv is confusing because it also renames files.

`git restore` though is slightly nicer than using checkout. I've incorporated its use into my workflow, even though I've previously used checkout for the same operation.


I've also been using git since around that time but had no problem _switching_ in 2019 because I'd also spent many years using svn. Choice is good, switch just fits my brain better.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: