On Wed, Nov 28, 2018 at 7:03 AM Junio C Hamano <gitster@xxxxxxxxx> wrote: > > Nguyễn Thái Ngọc Duy <pclouds@xxxxxxxxx> writes: > > > The good old "git checkout" command is still here and will be until > > all (or most of users) are sick of it. > > Two comments on the goal (the implementation looked reasonable > assuming the reader agrees with the gaol). > > At least to me, the verb "switch" needs two things to switch > between, i.e. "switch A and B", unless it is "switch to X". > Either "switch-to-branch" or simply "switch-to", perhaps? > > As I already hinted in my response to Stefan (?) about > checkout-from-tree vs checkout-from-index, a command with multiple > modes of operation is not confusing to people with the right mental > model, and I suspect that having two separate commands for "checking > out a branch" and "checking out paths" that is done by this step > would help users to form the right mental model. Since the other one is already "checkout-files", maybe this one could just be "checkout-branch". > So I tend to think > these two are "training wheels", and suspect that once they got it, > nobody will become "sick of" the single "checkout" command that can > be used to do either. It's just the matter of being aware what can > be done (which requires the right mental model) and how to tell Git > what the user wants it do (two separate commands, operating mode > option, or just the implied command line syntax---once the user > knows what s/he is doing, these do not make that much a difference). I would hope this becomes better defaults and being used 90% of time. Even though I know "git checkout" quite well, it still bites me from time to time. Having the right mental model is one thing. Having to think a bit every time to write "git checkout" with the right syntax, and whether you need "--" (that ambiguation problem can still bite you from time to time), is frankly something I'd rather avoid. -- Duy