git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Decoding git show-branch output

From
SBSanti Béjar <sbejar@gmail.com>
Date
Jan 19, 2007, 14:13 UTC
Message-ID
<8aa486160701190613j6493daccofc259a8b17c0f1d1@mail.gmail.com>
In-Reply-To
<17840.50115.999227.260259@lisa.zopyra.com>
On 1/19/07, Bill Lear <rael@zopyra.com> wrote:
[...]
> I'm very confused by the syntax above.  What does "[master^2^]" mean?
> Ditto with things like "[master~3^2^2]" and "[master~3^2~2]".
They explain the relation between commits:

^ -> first parent ^n -> n-th parent ~n -> <n>th generation parent, following only the first parent.

See the manual page of git-rev-parse (or the tutorial for some simple examples).
Show 9 quoted lines
>  Why is the order
>
> [master]
> [master^2]
> [master^2^]
> [master^]
>
> ?  I would have thought [master] would be followed by [master^], not
> [master^2].  Obviously I'm confused.
The order of the parents is not important.
Show 23 quoted lines
> I'm used to visual representations that show things in chronological order,
> from left to right, say as
>
>                                    H---I---J  second
>                                   /
>                          E---F---G---K---L  first
>                         /
>                        /       O---P---Q  third
>                       /       /
>          A---B---C---D---M---N  master
>
> or:
>
>                                    H---I---J  second
>                                   /         \
>                          E---F---G---K---L---R  first
>                         /                     \
>                        /       O---P---Q  third \
>                       /       /         \         \
>          A---B---C---D---M---N-----------S---------T  master
>
> (third merged onto master, second onto first, first onto master)
>
Then, use gitk to visualize the graph.
> Again, apologies if this is not the appropriate forum.
Your are welcome.
Santi
Previous: Bill LearNext: Bill Lear
Message 2 of 5 in “Decoding git show-branch output”
  1. Bill LearJan 19, 2007
  2. Santi BéjarJan 19, 2007
  3. Bill LearJan 19, 2007
  4. Jakub NarebskiJan 19, 2007
  5. Junio C HamanoJan 19, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.