Re: Git in a Nutshell guide
- From
- Jonas Juselius <jonas.juselius@chem.uit.no>
- Date
- Nov 19, 2007, 16:56 UTC
- Message-ID
- <1195491382.10573.34.camel@localhost>
- In-Reply-To
- <8c5c35580711190845s71a4880ek4ab28170d277e0e6@mail.gmail.com>
On Mon, 2007-11-19 at 17:45 +0100, Lars Hjemli wrote:
> > Very nice introduction, but I have a couple of comments. >
Thank you :)
Show 7 quoted lines
> In "Specifying revisions" you say that '^' and '~' are equal, but that > is not true. ^ is used to select the first parent of a commit, ^2 > selects the second parent of a merge commit (and ^3 selects the third > parent of an octopus merge), while the '~' is used to go back any > number of generations, following the first parents of each commit (~ > selects the first parent, ~2 selects the first grand-parent etc). >
Thanks for the the clarification. I've never done an octopus, so I simply ignored the matter. I'll correct the text and add a footnote.
Show 9 quoted lines
> Also, I think you might scare users away from 'git reset':
>
> git reset resets the branch to a specified state invisibly and
> without possibility to go back. Ever. Your call.
>
> That's not true, since any "modern" git has reflogs enabled. If you do
> 'git reset --hard HEAD^^^' and then realize it was a mistake you can
> just 'git reset --hard HEAD@{1}'
> This was new to me ;) I'll correct and add a note on reflogs.
.j.