3 ms·
> but I disagree that this is one of those cases I do think this is precisely one of those cases. "Branch" is a major, repo-modifying operation; "checkout" is
by sjwright 14y ago
> but I disagree that this is one of those cases
I do think this is precisely one of those cases.
"Branch" is a major, repo-modifying operation; "checkout" is a trivial context switch operation. The user interface disaster here was that the major operation is treated as subservient to the trivial operation. It should be the other way around.
Therefore, the shortcut for creating a branch and switching to it should be
git branch -c new-branch
whereby the -c switch checks you into that branch immediately.
- johnny22 14y agobranches aren't supposed to be "major". That's the major difference between a system like git and svn. branches are cheap. They are supposed to be used often and even be disposable.
- cjh_ 14y agoI don't understand how creating a branch is a major operation. Creating a branch is non-destructive and cheap, tidying up after accidental creation is also easy.