From: Jari Aalto <jari.aalto@cante.net>
To: git@vger.kernel.org
Subject: Re: [PATCH] Documentation/git-reset.txt: Use HEAD~N syntax everywhere (unify examples)
Date: Sat, 02 Feb 2008 14:59:43 +0200 [thread overview]
Message-ID: <8x235xa8.fsf@blue.sea.net> (raw)
In-Reply-To: 20080202084406.GA15305@glandium.org
* Sat 2008-02-02 Mike Hommey <mh@glandium.org> gmane.comp.version-control.git
* Message-Id: 20080202084406.GA15305@glandium.org
>>
>> > -$ git reset --soft HEAD^ <1>
>> > +$ git reset --soft HEAD~1 <1>
>> > -<1> The last three commits (HEAD, HEAD^, and HEAD~2) were bad
>> > +<1> The last three commits (HEAD, HEAD~1, and HEAD~2) were bad
>> > -$ git reset --soft HEAD^ ;# go back to WIP state <2>
>> > +$ git reset --soft HEAD~1 ;# go back to WIP state <2>
>> People need to refer to the HEAD^ (one commit ago) much more
>> often than HEAD~N for larger values of N.
I use HEAD~1 always, because I think the consistency in learning the
most important factor.
It does not matter what advanced users use. The documentation should
primarily focus the newcomers.
The first question a newbie asks, if manual pages mixes syntaxes:
What the heck "^" ?. I just saw HEAD~N, is the other one somehow
special?
All the other examples refer to
HEAD~N
Those used to git may prefer ^, but it does not follow that others
necessarily do so and that that should be the "proper learning path".
People usually migrate to git from other VCSs, which have very
consistent UI - There are no alternatives
-r1:10 Subversion
-r1..19 Bzr
...etc
It's unfortunate is the focus is given to comments like "easier type",
when the context is the manual pages.
>> Especially about HEAD~1, nobody sane would type that.
You consider all such users insane? It actually helps to select onlyt
one sytax, and HEAD~N is much more readable without further explanations,
(becasue people are already used to knowing, from other VCSs, what a
HEAD or TIP is). It's not all that different from prefering the
"--quiet" over "-q" e.g. e.g. in shell scripts.
Jari
--
Welcome to FOSS revolution: we fix and modify until it shines
next prev parent reply other threads:[~2008-02-02 13:01 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-02 1:41 [PATCH] Documentation/git-reset.txt: Use HEAD~N syntax everywhere (unify examples) Jari Aalto
2008-02-02 2:37 ` Johannes Schindelin
2008-02-02 2:59 ` Junio C Hamano
2008-02-02 8:44 ` Mike Hommey
2008-02-02 12:59 ` Jari Aalto [this message]
2008-02-02 13:37 ` Jakub Narebski
2008-02-02 20:10 ` Jari Aalto
2008-02-03 2:07 ` Johannes Schindelin
2008-02-02 16:18 ` J. Bruce Fields
2008-02-02 20:15 ` Jari Aalto
2008-02-02 22:39 ` Robin Rosenberg
2008-02-02 21:31 ` Junio C Hamano
2008-02-03 19:30 ` Dmitry Potapov
2008-02-03 23:48 ` Jari Aalto
2008-02-04 0:28 ` Jakub Narebski
2008-02-04 22:33 ` Dmitry Potapov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8x235xa8.fsf@blue.sea.net \
--to=jari.aalto@cante.net \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.