Web lists-archives.com

Re: [PATCH v1 11/11] doc: promote "git restore"




On Mon, Mar 11, 2019 at 9:12 PM Randall S. Becker
<rsbecker@xxxxxxxxxxxxx> wrote:
>
> > -----Original Message-----
> > From: git-owner@xxxxxxxxxxxxxxx <git-owner@xxxxxxxxxxxxxxx> On Behalf
> > Of Elijah Newren
> > Sent: March 9, 2019 14:38
> > To: Nguyễn Thái Ngọc Duy <pclouds@xxxxxxxxx>
> > Cc: Git Mailing List <git@xxxxxxxxxxxxxxx>; Junio C Hamano
> > <gitster@xxxxxxxxx>
> > Subject: Re: [PATCH v1 11/11] doc: promote "git restore"
> >
> > On Fri, Mar 8, 2019 at 2:17 AM Nguyễn Thái Ngọc Duy
> > <pclouds@xxxxxxxxx> wrote:
> > >
> > > The new command "git restore" (together with "git switch") are added
> > > to avoid the confusion of one-command-do-all "git checkout" for new
> > > users. They are also helpful to avoid ambiguation context.
> >
> > s/ambiguation/ambiguous/ or s/ambiguation context/ambiguity/?
> >
> > > For these reasons, promote it everywhere possible. This includes
> > > documentation, suggestions/advice from other commands.
> > >
> > > One nice thing about git-restore is the ability to restore
> > > "everything", so it can be used in "git status" advice instead of both
> > > "git checkout" and "git reset".  The three commands suggested by "git
> > > status" are add, rm and restore.
> > >
> > > "git checkout" is also removed from "git help" (i.e. it's no longer
> > > considered a commonly used command)
>
> Just curious: At what point did git checkout become not commonly used? Git switch and git restore are not yet in git as of 2.21.0, which is rather current. Maybe I missed a thread.

I declare "git checkout" not commonly used the moment git-switch and
git-restore are released!

More seriously, this is an attempt to promote new commands. The
"commonly used" here refers to the set of commands that show when you
run "git help" (they are called "common" in command-list.txt
classification). Since the people who type "git help" are mostly new
people, I think promoting the friendlier alternative is a good idea.
And no neither switch or restore has been released. They are not even
in 'pu' yet.
-- 
Duy