Re: git switch/restore, still experimental?
- From
Felipe Contreras <felipe.contreras@gmail.com>
- Date
- May 6, 2021, 11:00 UTC
- Message-ID
- <6093cc63a4e81_325720840@natae.notmuch>
- In-Reply-To
- <xmqq35v01ua3.fsf@gitster.g>
Junio C Hamano wrote:
Show 11 quoted lines
> Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes: > > > I mean, I see why. You don't want a typo of "master" as "maaster" to > > create a new "maaster" branch, so really that's out. But it really > > should be: > > > > # -n or -N for --new / --new --force (the latter just in case of a > > # race, and just for consistency) > > git switch -n doesnotexist > > I do not see why --new is better than --create;
I do. Different languages equal different minds.
New in this context is an adjetive: it is a modifier of a noun, in this case, a branch.
Create is a verb; it's an action.
Linguistically speaking they could not be more different.
You don't do two verbs at a time. Either you sleep, or you eat, but you don't do both. Similarly you don't switch and create. Doesn't make sense.
If you use natural language:
1. Git, switch to a new branch
2. Git, switch, create, branch
One of these simply flows, the other is complete gibberish. I think anyone familiar with English can identify which is which.
Cheers.
-- Felipe Contreras