Re: [PATCH] doc: use "git switch -c" rather than "git checkout -b" consistently
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 9, 2023, 06:30 UTC
- Message-ID
- <xmqqk01wusmz.fsf@gitster.g>
- In-Reply-To
- <CAPig+cQe_VMW2KV+ZyZwosFw07Q+hePryDVushRJ-jFfD4yzpw@mail.gmail.com>
Eric Sunshine <sunshine@sunshineco.com> writes:
Show 13 quoted lines
> touches is given merely as examples one might use, then I could see > git-switch being prepended to the list rather than entirely replacing > git-checkout. For instance: > > If we have not yet moved away from commit `f`, > any of these will create a reference to it: > > ------------ > $ git switch -c foo <1> > $ git checkout -b foo <1> > $ git branch foo <2> > $ git tag foo <3> > ------------
That can invite "do we need to use checkout after doing switch?" confusion. I would understand if it were
$ git checkout -b foo # or "git switch -c foo" <1>
or something that makes it clear either one, but not both, is used there.
Thanks.