From: Eric Sunshine Date: Mon, 09 Jan 2023 04:48:46 GMT Subject: Re: [PATCH] doc: use "git switch -c" rather than "git checkout -b" consistently Message-ID: In-Reply-To: On Sun, Jan 8, 2023 at 11:36 PM Junio C Hamano wrote: > > From: Yutaro Ohno > > Subject: Re: [PATCH] doc: use "git switch -c" rather than "git checkout -b" consistently > > Hmph. When two things work equally well, is it a good idea to > describe only one "consistently", or mention both that can be used > pretty much interchangeably in different places? I am not 100% sure > "consistently" is a good thing here. > > Thoughts from others? Perhaps if the patch was sold as filling in a gap left by 328c6cb853 (doc: promote "git switch", 2019-03-29) it would be more palatable. It does feel a bit strange that within the git-checkout documentation, this patch is replacing an example invocation of git-checkout with an invocation of git-switch. However, as the list of commands the patch 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> ------------