Thread (6 messages) flat view 6 messages, 2 authors, 2021-07-14

Re: PATCH: improve git switch documentation

From: Felipe Contreras <hidden>
Date: 2021-07-12 16:44:17

Sergey Organov wrote:
Felipe Contreras [off-list ref] writes:
quoted
Sergey Organov wrote:
[...]
quoted
quoted
Creating (a branch) is fundamentally different operation than switching
to (a branch), and that's why the former doesn't fit into "git switch".
Not in my mind. Instead of switching to an existing branch, I'm switching
to a new branch, which is easily understood by
`git switch --new branch`.
To me:

"create a new branch" is basic operation.

"switch to another branch" is basic operation.

"create a new branch and then switch to it" is compound operation.
Compound operations soon become basic operations in the mind of an
expert.

Lifting your feet, and then landing your feet might be basic operations
when you are 1 yo, but soon enough they become "walking".

Similarly checking out a commit and then cherry-picking a sequence of
commits while resolving conflicts becomes "rebasing".

In my mind I'm not doing two operations, it's one operation with a
modifier:

  git switch --new branch

--new is an adverb, not an operation.

-- 
Felipe Contreras
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help