Skip to content
Better HN
Top
New
Best
Ask
Show
Jobs
Search
⌘K
undefined | Better HN
0 points
nine_k
2y ago
0 comments
Share
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 main
0 comments
default
newest
oldest
scubbo
2y ago
Eh, 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".
nine_k
OP
2y ago
It's a bit like building a train station is a special case of arriving to it :)
golergka
2y ago
It's arriving at it with trucks and bulldozers and other equipment repeatedly, but essentially yes.
m463
2y ago
maybe like mkdir + chdir
j
/
k
navigate · click thread line to collapse