Re: PATCH: improve git switch documentation
- From
Felipe Contreras <felipe.contreras@gmail.com>
- Date
- Jul 12, 2021, 17:09 UTC
- Message-ID
- <60ec7741640d5_a452520863@natae.notmuch>
- In-Reply-To
- <f0770358-be4c-a747-0851-b2fd73c1978e@mfriebe.de>
Martin wrote:
Show 26 quoted lines
> On 12/07/2021 18:24, Felipe Contreras wrote: > > Sergey Organov wrote: > > Even standardizing `git branch` would be an almost-impossible task, even > > if we manage to convince others. `git new branch` even more impossible. > > > > Not sure but from the glance at hg that I took, they seem to use the > plural for nouns. > > So then we could have > > git branch <new-branch-name> > > git branches new // long version > git branches list > git branches delete > .... > > However, standardizing to a fixed verb/noun rule will still be more than > a challenge. > > The above would as guildeline be > > git verb > or > git plural-noun verb
I don't see what's wrong with considering the second form a subcommand:
git $subcommand $verb
Like `git bisect start`. That way you could consider `branches` to be a subcommand, it doesn't need to be a plural noun.
Show 10 quoted lines
> Yet try to do that with > git status > git log > > I don't see how a better alternative for those can be found. One that > actually is accepted because it's better, not just because it follows a > rule. > > status, is not a verb > log is the wrong verb, or again a noun.
If `git branch` is a shorthand for `git branches new`, the you could consider `git status` to be the a shortcut for `git status show`, but since there's no other action to be done with the status subcommand, then it's always implied.
-- Felipe Contreras