From: Luke Diamand Date: Tue, 28 Feb 2012 09:07:41 GMT Subject: Tilde spec - befuzzled Message-ID: <4F4C995D.9000504@diamand.org> The documentation for caret and tilde specs is making my head hurt, even though they always _do_ exactly what I want. And I thought I understood them until I read more carefully. A suffix '{caret}' to a revision parameter means the first parent of that commit object. '{caret}' means the th parent (i.e. '{caret}' So far, so good. '{tilde}', e.g. 'master{tilde}3':: A suffix '{tilde}' to a revision parameter means the commit object that is the th generation grand-parent of the named commit object, following only the first parents. Hang on, *grand*-parents? So HEAD~1 won't give me the *parent* commit of HEAD, but the *grandparent* commit of HEAD (following only the first parents) ? How do I get to the *parent* commit of HEAD? Does that mean that HEAD~ != HEAD^ And why does HEAD~1 always look exactly what I would naively call the 'parent' of HEAD? I'm pretty sure I'm missing something very obvious. I think it must confuse other people as well though, as it's quite easy to find webpages around that claim that tildes give the _parent_ commit. Thanks Luke