Re:Fast
by arrowsmith on Wednesday July 05, 2023 @08:21PM
(#36609197)
Checkout can move your head to different commit and it can copy files to your working tree from a non-checked-out commit. What's it's third function?
[ Parent
| on HN ]
It can create a branch with -b, based on a branch of your choice (not necessarily current).
I constantly use this, having created an alias:
[some other branch]$ git cob feature/foo123 mainEh, I can squint and see that as a special-case of moving your head to another ref - the `-b` merely flagging "if this branch doesn't exist, create it instead of erroring".
It's a bit like building a train station is a special case of arriving to it :)
maybe like mkdir + chdir