Re: Decoding git show-branch output

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Friday, January 19, 2007 at 15:13:30 (+0100) Santi Béjar writes:
>On 1/19/07, Bill Lear <rael@xxxxxxxxxx> 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).

I did.  Still don't understand.  So, following your explanation,

master~3 ^2 ~2

Means the 2nd (first generation) parent of the second parent of the
3rd (first generation) parent?  Is there a way to simply state this in
plain words, say in terms of commits/merges?  I'm unsure how to
interpret the above, especially since none of us has been developing
on a branch (I see no other branch names except master, also).

I'm currently running qgit/gitk to try to figure this all out.  It
appears that somehow we generated way more branches than we thought we
were.

Our basic work-flow for a developer is to set up one or more "private"
repositories on our machines, by issuing a git-clone of our company repo.

Then we set up a "public" repo on our machine by issuing a "git --bare
init-db --shared".  We then push into this repo when ready, and from
there other developers pull.

Then, it seems that we push to our company repository both from our
private repos and our public ones, as we see fit.

I'm not sure if this is sane: is it ok to clone the company repo,
then push from that clone into a bare repo, then from there to
the company one?  Is git doing some sort of weird, silent pseudo-merge
that we don't understand, thus generated what appears to be a very
tangled, albeit brief, history, when we examine it?

I have read about 8 documents on git, experimented with it
extensively, and, at our company, I am arguably the "git expert"; I
thought that I had done all of my work on my local repo's master
branch, and only pushed from that branch up to our company repo.  Yet,
qgit shows that one of my first commits (to fix a few simply typos in
documentation) goes off onto another branch.  git-show-branch shows
"[master~3^2~9] Fix a few typos" for this.  I'm very confused how this
could have happened, and I want to ensure we are doing things in a way
that is predictable...

Thank you again.


Bill
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]