3 ms·
TL;DR because 'checkout' was found to be confusing, as of git 2.23 the switch command can switch to branches or commits (git switch master, git switch 0c38cf) a
by lucb1e 5y ago
TL;DR because 'checkout' was found to be confusing, as of git 2.23 the switch command can switch to branches or commits (git switch master, git switch 0c38cf) and the restore command restores files (git restore pufferfish.txt).
- cybersvenn 5y agoInstead of one confusing command we now have three confusing commands.
- lucb1e 5y agoI don't find switch or restore confusing? And also I never found checkout confusing, but that might only have been because I never realized it had multiple functions. I've been using it for both things (switching and restoring) for years, but I remember starting to read the article and thinking: how did I never notice this is the same command for two completely different things?! Maybe I used to know and now it's just not something I think about anymore? Either way, I can see how checkout can be seen as odd, but why switch or restore?
- makeitdouble 5y agoArguably there is some semantic overlap between restore and reset.