by clon · 5y ago · 0 comments
git checkout -b new_branch
You can do the same with the new one, but the flag is -c: git switch -c new_branch
A good example why developers should not try to be designers. Even of talking about "API/CLI design.IMO the UI of git switch is much more intuitive, since the argument is always a branch and the default behavior is to switch to an existing branch. For slightly different behavior (like creating the branch first) there are flags.
So I think it's good that the flag for switch is a different one than for checkout, since the interface of git checkout was quite unintuitive IMO.
With `checkout`, however, what does `-b` even mean? Branch?
That said, it'll sure take time before the majority of developers (including myself) get onboard with it.
Would a deprecation flag be a good idea for git?
KDE, git, and FreePascal / Lazarus.