* [PATCH] Add a reference to gitk localbranc remote/branch in gittutorial @ 2008-08-25 19:50 Paolo Ciarrocchi 2008-08-25 20:12 ` Eric Raible 0 siblings, 1 reply; 15+ messages in thread From: Paolo Ciarrocchi @ 2008-08-25 19:50 UTC (permalink / raw) To: git, gitster Hi all, I think it's worth to mention that a user can issue the command: $gitk local remote/branch to browse what he/she just fetched from the remote branch. Thanks to a few guys on the #git channel! Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com> --- Documentation/gittutorial.txt | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/Documentation/gittutorial.txt b/Documentation/gittutorial.txt index 48d1454..1407973 100644 --- a/Documentation/gittutorial.txt +++ b/Documentation/gittutorial.txt @@ -326,6 +326,12 @@ alice$ git log -p ..FETCH_HEAD This operation is safe even if Alice has uncommitted local changes. +Alice can also use gitk to browse that Bob did: + +------------------------------------------------ +alice$ gitk master origin/master +------------------------------------------------ + After inspecting what Bob did, if there is nothing urgent, Alice may decide to continue working without pulling from Bob. If Bob's history does have something Alice would immediately need, Alice may choose to -- 1.6.0.2.g2ebc0.dirty ^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH] Add a reference to gitk localbranc remote/branch in gittutorial 2008-08-25 19:50 [PATCH] Add a reference to gitk localbranc remote/branch in gittutorial Paolo Ciarrocchi @ 2008-08-25 20:12 ` Eric Raible 2008-08-25 20:33 ` Paolo Ciarrocchi 2008-08-25 21:53 ` Junio C Hamano 0 siblings, 2 replies; 15+ messages in thread From: Eric Raible @ 2008-08-25 20:12 UTC (permalink / raw) To: git Paolo Ciarrocchi <paolo.ciarrocchi <at> gmail.com> writes: > +Alice can also use gitk to browse that Bob did: s/that/what/ ? > +------------------------------------------------ > +alice$ gitk master origin/master > +------------------------------------------------ I think that you meant: alice$ gitk master..origin/master right? ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] Add a reference to gitk localbranc remote/branch in gittutorial 2008-08-25 20:12 ` Eric Raible @ 2008-08-25 20:33 ` Paolo Ciarrocchi 2008-08-25 21:53 ` Junio C Hamano 1 sibling, 0 replies; 15+ messages in thread From: Paolo Ciarrocchi @ 2008-08-25 20:33 UTC (permalink / raw) To: Eric Raible; +Cc: git On Mon, Aug 25, 2008 at 10:12 PM, Eric Raible <raible@gmail.com> wrote: > Paolo Ciarrocchi <paolo.ciarrocchi <at> gmail.com> writes: > >> +Alice can also use gitk to browse that Bob did: > > s/that/what/ ? Yes! >> +------------------------------------------------ >> +alice$ gitk master origin/master >> +------------------------------------------------ > > I think that you meant: > > alice$ gitk master..origin/master > > right? Well, I thought gitk master origin/master would be sufficient. Guess I'm wrong... Cheers, -- Paolo http://paolo.ciarrocchi.googlepages.com/ ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] Add a reference to gitk localbranc remote/branch in gittutorial 2008-08-25 20:12 ` Eric Raible 2008-08-25 20:33 ` Paolo Ciarrocchi @ 2008-08-25 21:53 ` Junio C Hamano 2008-08-25 22:12 ` Paolo Ciarrocchi 1 sibling, 1 reply; 15+ messages in thread From: Junio C Hamano @ 2008-08-25 21:53 UTC (permalink / raw) To: Eric Raible; +Cc: git, Paolo Ciarrocchi Eric Raible <raible@gmail.com> writes: > Paolo Ciarrocchi <paolo.ciarrocchi <at> gmail.com> writes: > >> +Alice can also use gitk to browse that Bob did: > > s/that/what/ ? > >> +------------------------------------------------ >> +alice$ gitk master origin/master >> +------------------------------------------------ > > I think that you meant: > > alice$ gitk master..origin/master I'd suggest rewording the explanation to have Alice "compare what both of them did", not just "browse what Bob did". And for that purpose, I think the original form used by Paolo's patch is the most appropriate here in an early part of the tutorial, as it teaches how to view full histories leading to the tips of these two branches. Earlier in the tutorial sequence we teach "gitk" without any parameter to view the history of the current branch, and here the user learns one new thing, to view more than just the current branch. Limiting the output with "..origin/master" (or "...origin/master") can be taught after demonstrating this most basic form. ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] Add a reference to gitk localbranc remote/branch in gittutorial 2008-08-25 21:53 ` Junio C Hamano @ 2008-08-25 22:12 ` Paolo Ciarrocchi 2008-08-26 0:29 ` Junio C Hamano 0 siblings, 1 reply; 15+ messages in thread From: Paolo Ciarrocchi @ 2008-08-25 22:12 UTC (permalink / raw) To: Junio C Hamano; +Cc: Eric Raible, git On 8/25/08, Junio C Hamano <gitster@pobox.com> wrote: > Eric Raible <raible@gmail.com> writes: > >> Paolo Ciarrocchi <paolo.ciarrocchi <at> gmail.com> writes: >> >>> +Alice can also use gitk to browse that Bob did: >> >> s/that/what/ ? >> >>> +------------------------------------------------ >>> +alice$ gitk master origin/master >>> +------------------------------------------------ >> >> I think that you meant: >> >> alice$ gitk master..origin/master > > > I'd suggest rewording the explanation to have Alice "compare what both of > them did", not just "browse what Bob did". yes, what i wrote was unclear. I managed to confuse myself too :-) > And for that purpose, I think the original form used by Paolo's patch is > the most appropriate here in an early part of the tutorial, as it teaches > how to view full histories leading to the tips of these two branches. well, it might be a good idea to mention both. do you think we should add a note about git log --graph as well? > Earlier in the tutorial sequence we teach "gitk" without any parameter to > view the history of the current branch, and here the user learns one new > thing, to view more than just the current branch. i think we should use the nice gitk output in other sections of the document as well, i'll send some more patches. > Limiting the output with "..origin/master" (or "...origin/master") can be > taught after demonstrating this most basic form. what wording would you use to clearly explain the difference between ..origin/master and ...origin/master ? anyway, thanks for the commentr. I'll send a new patch in 24 hours. ciao, -- Paolo http://paolo.ciarrocchi.googlepages.com/ ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] Add a reference to gitk localbranc remote/branch in gittutorial 2008-08-25 22:12 ` Paolo Ciarrocchi @ 2008-08-26 0:29 ` Junio C Hamano 2008-08-26 8:16 ` Paolo Ciarrocchi 0 siblings, 1 reply; 15+ messages in thread From: Junio C Hamano @ 2008-08-26 0:29 UTC (permalink / raw) To: Paolo Ciarrocchi; +Cc: Junio C Hamano, Eric Raible, git "Paolo Ciarrocchi" <paolo.ciarrocchi@gmail.com> writes: > On 8/25/08, Junio C Hamano <gitster@pobox.com> wrote: >> Eric Raible <raible@gmail.com> writes: >> >>> Paolo Ciarrocchi <paolo.ciarrocchi <at> gmail.com> writes: >>> >>>> +Alice can also use gitk to browse that Bob did: >>> >>> s/that/what/ ? >>> >>>> +------------------------------------------------ >>>> +alice$ gitk master origin/master >>>> +------------------------------------------------ >>> >>> I think that you meant: >>> >>> alice$ gitk master..origin/master >> >> I'd suggest rewording the explanation to have Alice "compare what both of >> them did", not just "browse what Bob did". > ... >> And for that purpose, I think the original form used by Paolo's patch is >> the most appropriate here in an early part of the tutorial, as it teaches >> how to view full histories leading to the tips of these two branches. > > well, it might be a good idea to mention both. > > do you think we should add a note about git log --graph as well? "Probably yes" and "not here". >> Earlier in the tutorial sequence we teach "gitk" without any parameter to >> view the history of the current branch, and here the user learns one new >> thing, to view more than just the current branch. > ... >> Limiting the output with "..origin/master" (or "...origin/master") can be >> taught after demonstrating this most basic form. With the existing flow, I would actually suggest you not to use origin/master at all. The example before you inserted your changes does not update origin/master. Alice can use gitk to compare what both of them did: $ gitk HEAD FETCH_HEAD then teach the limiting: Notice unlike the earlier example that you used gitk to view the history leading to current status, this shows both histories leading to Alice's current state (HEAD) and the state you just fetched from Bob (FETCH_HEAD). You can limit what is shown by using revision range notation: $ gitk HEAD..FETCH_HEAD Two commits written with two dots in between means "show everything that is reachable from the latter but excluding anything that is reachable from the former". Alice already knows what she did well, as well as what she and Bob started working on, and she is only interested in what Bob did since their histories forked, working independently. By the way, the notation "git log -p ..FETCH_HEAD" you saw earlier is a short-hand for "git log -p HEAD..FETCH_HEAD". HEAD, that means your current state, can be dropped on either side of the two-dot range notation. It might be better to remove the last paragraph, and instead explain the meaning of "..FETCH_HEAD" notation immediately after "git log -p" was used to "fetch-review-but-not-integrate" description (i.e. before the part your patch touched). If you want to, you can also teach three-dot form after showing how to use the two-dot form. Alice may want to view what both of them did since they forked. She can use three-dot form instead of the two-dot form: $ gitk HEAD...FETCH_HEAD This means "show everything that is reachable from either one, but exclude anything that is reachable from both of them". Again, note that these range notation can be used with both gitk and "git log". ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] Add a reference to gitk localbranc remote/branch in gittutorial 2008-08-26 0:29 ` Junio C Hamano @ 2008-08-26 8:16 ` Paolo Ciarrocchi 2008-08-26 8:24 ` Eric Raible 2008-08-26 18:13 ` Junio C Hamano 0 siblings, 2 replies; 15+ messages in thread From: Paolo Ciarrocchi @ 2008-08-26 8:16 UTC (permalink / raw) To: Junio C Hamano; +Cc: Eric Raible, git On Tue, Aug 26, 2008 at 2:29 AM, Junio C Hamano <gitster@pobox.com> wrote: [...] > With the existing flow, I would actually suggest you not to use > origin/master at all. The example before you inserted your changes does > not update origin/master. > > Alice can use gitk to compare what both of them did: > > $ gitk HEAD FETCH_HEAD > > then teach the limiting: > > Notice unlike the earlier example that you used gitk to view the > history leading to current status, this shows both histories > leading to Alice's current state (HEAD) and the state you just > fetched from Bob (FETCH_HEAD). You can limit what is shown by > using revision range notation: > > $ gitk HEAD..FETCH_HEAD > > Two commits written with two dots in between means "show > everything that is reachable from the latter but excluding > anything that is reachable from the former". Alice already knows > what she did well, as well as what she and Bob started working on, > and she is only interested in what Bob did since their histories > forked, working independently. > > By the way, the notation "git log -p ..FETCH_HEAD" you saw > earlier is a short-hand for "git log -p HEAD..FETCH_HEAD". HEAD, > that means your current state, can be dropped on either side of > the two-dot range notation. > > It might be better to remove the last paragraph, and instead explain the > meaning of "..FETCH_HEAD" notation immediately after "git log -p" was used > to "fetch-review-but-not-integrate" description (i.e. before the part your > patch touched). > > If you want to, you can also teach three-dot form after showing how to use > the two-dot form. > > Alice may want to view what both of them did since they forked. > She can use three-dot form instead of the two-dot form: > > $ gitk HEAD...FETCH_HEAD > > This means "show everything that is reachable from either one, but > exclude anything that is reachable from both of them". > > Again, note that these range notation can be used with both gitk > and "git log". > Maybe something like that? Not intended to be applied, probably manglade and with no sob. Just for discussion: diff --git a/gittutorial.txt.txt b/gittutorial.txt.txt index 48d1454..4f6d4e9 100644 --- a/gittutorial.txt.txt +++ b/gittutorial.txt.txt @@ -321,10 +321,51 @@ pulling, like this: ------------------------------------------------ alice$ git fetch /home/bob/myrepo master -alice$ git log -p ..FETCH_HEAD +alice$ git log -p HEAD..FETCH_HEAD ------------------------------------------------ This operation is safe even if Alice has uncommitted local changes. +Note that HEAD, that means your current state, can be dropped on either +side of the two-dot range notation. +This means that Alice can also inspect what Bod did issuing the following +command: + +------------------------------------------------ +alice$ git log -p ..FETCH_HEAD +------------------------------------------------ + +Alice can use gitk to compare what both of them did: + +------------------------------------------------ +$ gitk HEAD FETCH_HEAD +------------------------------------------------ + +This shows both histories leading to Alice's current state (HEAD) and the +state Alice just fetched from Bob (FETCH_HEAD). + +If Alice wants to visualize what Bob did since their historie forked +she can issue the following command: + +------------------------------------------------ +$ gitk HEAD..FETCH_HEAD +------------------------------------------------ + +Two commits written with two dots in between means "show +everything that is reachable from the latter but excluding +anything that is reachable from the former". + +Alice may want to view what both of them did since they forked. +She can use three-dot form instead of the two-dot form: + +------------------------------------------------ +$ gitk HEAD...FETCH_HEAD +------------------------------------------------ + +This means "show everything that is reachable from either one, but +exclude anything that is reachable from both of them". + +Please note that these range notation can be used with both gitk +and "git log". After inspecting what Bob did, if there is nothing urgent, Alice may decide to continue working without pulling from Bob. If Bob's history Ciao, -- Paolo http://paolo.ciarrocchi.googlepages.com/ ^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH] Add a reference to gitk localbranc remote/branch in gittutorial 2008-08-26 8:16 ` Paolo Ciarrocchi @ 2008-08-26 8:24 ` Eric Raible 2008-08-26 8:45 ` Paolo Ciarrocchi 2008-08-26 18:13 ` Junio C Hamano 1 sibling, 1 reply; 15+ messages in thread From: Eric Raible @ 2008-08-26 8:24 UTC (permalink / raw) To: Paolo Ciarrocchi; +Cc: Junio C Hamano, git On Tue, Aug 26, 2008 at 1:16 AM, Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com> wrote: > +If Alice wants to visualize what Bob did since their historie forked s/historie/histories/ ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] Add a reference to gitk localbranc remote/branch in gittutorial 2008-08-26 8:24 ` Eric Raible @ 2008-08-26 8:45 ` Paolo Ciarrocchi 2008-08-26 9:44 ` Paolo Ciarrocchi 0 siblings, 1 reply; 15+ messages in thread From: Paolo Ciarrocchi @ 2008-08-26 8:45 UTC (permalink / raw) To: Eric Raible; +Cc: Junio C Hamano, git On Tue, Aug 26, 2008 at 10:24 AM, Eric Raible <raible@gmail.com> wrote: > On Tue, Aug 26, 2008 at 1:16 AM, Paolo Ciarrocchi > <paolo.ciarrocchi@gmail.com> wrote: >> +If Alice wants to visualize what Bob did since their historie forked > > s/historie/histories/ Thanks, fixed. Ciao, -- Paolo http://paolo.ciarrocchi.googlepages.com/ ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] Add a reference to gitk localbranc remote/branch in gittutorial 2008-08-26 8:45 ` Paolo Ciarrocchi @ 2008-08-26 9:44 ` Paolo Ciarrocchi 0 siblings, 0 replies; 15+ messages in thread From: Paolo Ciarrocchi @ 2008-08-26 9:44 UTC (permalink / raw) To: Eric Raible; +Cc: Junio C Hamano, git On Tue, Aug 26, 2008 at 10:45 AM, Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com> wrote: > On Tue, Aug 26, 2008 at 10:24 AM, Eric Raible <raible@gmail.com> wrote: >> On Tue, Aug 26, 2008 at 1:16 AM, Paolo Ciarrocchi >> <paolo.ciarrocchi@gmail.com> wrote: >>> +If Alice wants to visualize what Bob did since their historie forked >> >> s/historie/histories/ > > Thanks, fixed. commit 83f4407bb8e8785d7fc62119010d1412e7cd6508 Author: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com> Date: Tue Aug 26 10:13:36 2008 +0200 Gittutorial update. Changes to gitturolia according to the discussion on the git mailing list diff --git a/gittutorial.txt.txt b/gittutorial.txt.txt index 48d1454..279ca46 100644 --- a/gittutorial.txt.txt +++ b/gittutorial.txt.txt @@ -321,10 +321,51 @@ pulling, like this: ------------------------------------------------ alice$ git fetch /home/bob/myrepo master -alice$ git log -p ..FETCH_HEAD +alice$ git log -p HEAD..FETCH_HEAD ------------------------------------------------ This operation is safe even if Alice has uncommitted local changes. +Note that HEAD, that means your current state, can be dropped on either +side of the two-dot range notation. +This means that Alice can also inspect what Bod did issuing the following +command: + +------------------------------------------------ +alice$ git log -p ..FETCH_HEAD +------------------------------------------------ + +Alice can use gitk to compare what both of them did: + +------------------------------------------------ +$ gitk HEAD FETCH_HEAD +------------------------------------------------ + +This shows both histories leading to Alice's current state (HEAD) and the +state Alice just fetched from Bob (FETCH_HEAD). + +If Alice wants to visualize what Bob did since their histories forked +she can issue the following command: + +------------------------------------------------ +$ gitk HEAD..FETCH_HEAD +------------------------------------------------ + +Two commits written with two dots in between means "show +everything that is reachable from the latter but excluding +anything that is reachable from the former". + +Alice may want to view what both of them did since they forked. +She can use three-dot form instead of the two-dot form: + +------------------------------------------------ +$ gitk HEAD...FETCH_HEAD +------------------------------------------------ + +This means "show everything that is reachable from either one, but +exclude anything that is reachable from both of them". + +Please note that these range notation can be used with both gitk +and "git log". After inspecting what Bob did, if there is nothing urgent, Alice may decide to continue working without pulling from Bob. If Bob's history Ciao, -- Paolo http://paolo.ciarrocchi.googlepages.com/ ^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH] Add a reference to gitk localbranc remote/branch in gittutorial 2008-08-26 8:16 ` Paolo Ciarrocchi 2008-08-26 8:24 ` Eric Raible @ 2008-08-26 18:13 ` Junio C Hamano 2008-08-27 7:58 ` Paolo Ciarrocchi 1 sibling, 1 reply; 15+ messages in thread From: Junio C Hamano @ 2008-08-26 18:13 UTC (permalink / raw) To: Paolo Ciarrocchi; +Cc: Junio C Hamano, Eric Raible, git "Paolo Ciarrocchi" <paolo.ciarrocchi@gmail.com> writes: > Maybe something like that? > Not intended to be applied, probably manglade and with no sob. > Just for discussion: > > diff --git a/gittutorial.txt.txt b/gittutorial.txt.txt > index 48d1454..4f6d4e9 100644 > --- a/gittutorial.txt.txt > +++ b/gittutorial.txt.txt > @@ -321,10 +321,51 @@ pulling, like this: > > ------------------------------------------------ > alice$ git fetch /home/bob/myrepo master > -alice$ git log -p ..FETCH_HEAD > +alice$ git log -p HEAD..FETCH_HEAD > ------------------------------------------------ > > This operation is safe even if Alice has uncommitted local changes. > +Note that HEAD, that means your current state, can be dropped on either > +side of the two-dot range notation. Descriptions of individual steps all looked good, but the presentation order is a bit screwy here. You are introducing two-dot range without explaining what it means here, and the explanation comes a bit later. So here are the tweaks I would suggest: * Show only "git log -p HEAD..FETCH_HEAD" here; * After "This operation is safe ... local changes.", say "The range notation HEAD..FETCH_HEAD" means "show everything that is reachable from the FETCH_HEAD but exclude anything that is reachable from HEAD. Alice already knows everything that leads to her current state (HEAD), and reviewing what Bob has in his state (FETCH_HEAD) that she has not seen with this command"; * Drop "This means..." and "log -p ..FETCH" example; * Replace the explanation for the two-dot range notation after "gitk HEAD..FETCH_HEAD" with "This uses the same two-dot range notation we saw earlier with 'git log'". * And finally, if we wanted to, we can top about omission of HEAD in either end of the range notation. Just before "Please note that these range notation...", say "Because viewing range between your current state and something else is common, you can omit HEAD from either side of two- or three-dot range notation. I.e. 'git log ..FETCH_HEAD' is a shorthand for 'git log HEAD..FETCH_HEAD', and 'gitk ...FETCH_HEAD' is a shorthand for 'gitk HEAD...FETCH_HEAD'. > +This means that Alice can also inspect what Bod did issuing the following > +command: > + > +------------------------------------------------ > +alice$ git log -p ..FETCH_HEAD > +------------------------------------------------ > + > +Alice can use gitk to compare what both of them did: > + > +------------------------------------------------ > +$ gitk HEAD FETCH_HEAD > +------------------------------------------------ > + > +This shows both histories leading to Alice's current state (HEAD) and the > +state Alice just fetched from Bob (FETCH_HEAD). > + > +If Alice wants to visualize what Bob did since their historie forked > +she can issue the following command: > + > +------------------------------------------------ > +$ gitk HEAD..FETCH_HEAD > +------------------------------------------------ > + > +Two commits written with two dots in between means "show > +everything that is reachable from the latter but excluding > +anything that is reachable from the former". > + > +Alice may want to view what both of them did since they forked. > +She can use three-dot form instead of the two-dot form: > + > +------------------------------------------------ > +$ gitk HEAD...FETCH_HEAD > +------------------------------------------------ > + > +This means "show everything that is reachable from either one, but > +exclude anything that is reachable from both of them". > + > +Please note that these range notation can be used with both gitk > +and "git log". > > After inspecting what Bob did, if there is nothing urgent, Alice may > decide to continue working without pulling from Bob. If Bob's history ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] Add a reference to gitk localbranc remote/branch in gittutorial 2008-08-26 18:13 ` Junio C Hamano @ 2008-08-27 7:58 ` Paolo Ciarrocchi [not found] ` <402731c90808270121t5c09efd1m3b60a1ad15f8f705@mail.gmail.com> 2008-08-27 18:06 ` Junio C Hamano 0 siblings, 2 replies; 15+ messages in thread From: Paolo Ciarrocchi @ 2008-08-27 7:58 UTC (permalink / raw) To: Junio C Hamano; +Cc: Eric Raible, git On Tue, Aug 26, 2008 at 8:13 PM, Junio C Hamano <gitster@pobox.com> wrote: > "Paolo Ciarrocchi" <paolo.ciarrocchi@gmail.com> writes: [...] > So here are the tweaks I would suggest: > > * Show only "git log -p HEAD..FETCH_HEAD" here; OK. > * After "This operation is safe ... local changes.", say "The range > notation HEAD..FETCH_HEAD" means "show everything that is reachable > from the FETCH_HEAD but exclude anything that is reachable from HEAD. > Alice already knows everything that leads to her current state (HEAD), > and reviewing what Bob has in his state (FETCH_HEAD) that she has not > seen with this command"; Makes sense. > * Drop "This means..." and "log -p ..FETCH" example; OK. > * Replace the explanation for the two-dot range notation after "gitk > HEAD..FETCH_HEAD" with "This uses the same two-dot range notation we > saw earlier with 'git log'". > > * And finally, if we wanted to, we can top about omission of HEAD in > either end of the range notation. Just before "Please note that these > range notation...", say "Because viewing range between your current > state and something else is common, you can omit HEAD from either side > of two- or three-dot range notation. I.e. 'git log ..FETCH_HEAD' is a > shorthand for 'git log HEAD..FETCH_HEAD', and 'gitk ...FETCH_HEAD' is a > shorthand for 'gitk HEAD...FETCH_HEAD'. Right now I dind't mention the shorthand, I'm not sure whether it's worth to mention it in this first tutorial. What do you think of this whitespace damaged patch? BTW, does anybody know if/how to inline a patch using the web interface of Gmail? --8<--- diff --git a/gittutorial.txt.txt b/gittutorial.txt.txt index 48d1454..384972c 100644 --- a/gittutorial.txt.txt +++ b/gittutorial.txt.txt @@ -321,10 +321,37 @@ pulling, like this: ------------------------------------------------ alice$ git fetch /home/bob/myrepo master -alice$ git log -p ..FETCH_HEAD +alice$ git log -p HEAD..FETCH_HEAD ------------------------------------------------ This operation is safe even if Alice has uncommitted local changes. +The range notation HEAD..FETCH_HEAD" means "show everything that is reachable +from the FETCH_HEAD but exclude anything that is reachable from HEAD. +Alice already knows everything that leads to her current state (HEAD), +and reviewing what Bob has in his state (FETCH_HEAD) that she has not +seen with this command + +If Alice wants to visualize what Bob did since their histories forked +she can issue the following command: + +------------------------------------------------ +$ gitk HEAD..FETCH_HEAD +------------------------------------------------ + +This uses the same two-dot range notation we saw earlier with 'git log'. + +Alice may want to view what both of them did since they forked. +She can use three-dot form instead of the two-dot form: + +------------------------------------------------ +$ gitk HEAD...FETCH_HEAD +------------------------------------------------ + +This means "show everything that is reachable from either one, but +exclude anything that is reachable from both of them". + +Please note that these range notation can be used with both gitk +and "git log". After inspecting what Bob did, if there is nothing urgent, Alice may decide to continue working without pulling from Bob. If Bob's history --8<--- -- Paolo http://paolo.ciarrocchi.googlepages.com/ ^ permalink raw reply related [flat|nested] 15+ messages in thread
[parent not found: <402731c90808270121t5c09efd1m3b60a1ad15f8f705@mail.gmail.com>]
* Re: [PATCH] Add a reference to gitk localbranc remote/branch in gittutorial [not found] ` <402731c90808270121t5c09efd1m3b60a1ad15f8f705@mail.gmail.com> @ 2008-08-27 8:26 ` Paolo Ciarrocchi 0 siblings, 0 replies; 15+ messages in thread From: Paolo Ciarrocchi @ 2008-08-27 8:26 UTC (permalink / raw) To: David Aguilar; +Cc: Junio C Hamano, Eric Raible, git On Wed, Aug 27, 2008 at 10:21 AM, David Aguilar <davvid@gmail.com> wrote: > On Wed, Aug 27, 2008 at 12:58 AM, Paolo Ciarrocchi > <paolo.ciarrocchi@gmail.com> wrote: >> >> What do you think of this whitespace damaged patch? >> BTW, does anybody know if/how to inline a patch using the web >> interface of Gmail? > > You don't -- the preferred method is git send-email: > > http://git.or.cz/gitwiki/GitTips#head-a015948617d9becbdc9836776f96ad244ba87cb8 > > The gmail instructions on the wiki work like a charm. Don't get me wrong, when I'm at home I use a real MUA and I know how to send out patches but I'm often in places where I can only access to the gmail web interface, hence the question. And my sentence: ">> What do you think of this whitespace damaged patch?" was only because if Junio/thelist like the doc change then I'll wrote a proper changelog and send out the patch using my MUA ;-) Thanks. Ciao, -- Paolo http://paolo.ciarrocchi.googlepages.com/ ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] Add a reference to gitk localbranc remote/branch in gittutorial 2008-08-27 7:58 ` Paolo Ciarrocchi [not found] ` <402731c90808270121t5c09efd1m3b60a1ad15f8f705@mail.gmail.com> @ 2008-08-27 18:06 ` Junio C Hamano 2008-08-28 13:03 ` Paolo Ciarrocchi 1 sibling, 1 reply; 15+ messages in thread From: Junio C Hamano @ 2008-08-27 18:06 UTC (permalink / raw) To: Paolo Ciarrocchi; +Cc: Junio C Hamano, Eric Raible, git "Paolo Ciarrocchi" <paolo.ciarrocchi@gmail.com> writes: > What do you think of this whitespace damaged patch? Looks fine; I slightly miss the dotless form of gitk to show both histories fully that was in the original, though. Before this part, the tutorial has one invocation of gitk to view the history leading to the current state, and as a gentle introduction I think showing two full histories first before teaching to limit might make more sense, but that is minor. > diff --git a/gittutorial.txt.txt b/gittutorial.txt.txt > index 48d1454..384972c 100644 > --- a/gittutorial.txt.txt > +++ b/gittutorial.txt.txt I have to wonder why txt.txt, though. ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] Add a reference to gitk localbranc remote/branch in gittutorial 2008-08-27 18:06 ` Junio C Hamano @ 2008-08-28 13:03 ` Paolo Ciarrocchi 0 siblings, 0 replies; 15+ messages in thread From: Paolo Ciarrocchi @ 2008-08-28 13:03 UTC (permalink / raw) To: Junio C Hamano; +Cc: Eric Raible, git On Wed, Aug 27, 2008 at 8:06 PM, Junio C Hamano <gitster@pobox.com> wrote: >> diff --git a/gittutorial.txt.txt b/gittutorial.txt.txt >> index 48d1454..384972c 100644 >> --- a/gittutorial.txt.txt >> +++ b/gittutorial.txt.txt > > I have to wonder why txt.txt, though. Eheh, patch done on WinXP machine not properly set up... Regards, -- Paolo http://paolo.ciarrocchi.googlepages.com/ ^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2008-08-28 13:04 UTC | newest] Thread overview: 15+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-08-25 19:50 [PATCH] Add a reference to gitk localbranc remote/branch in gittutorial Paolo Ciarrocchi 2008-08-25 20:12 ` Eric Raible 2008-08-25 20:33 ` Paolo Ciarrocchi 2008-08-25 21:53 ` Junio C Hamano 2008-08-25 22:12 ` Paolo Ciarrocchi 2008-08-26 0:29 ` Junio C Hamano 2008-08-26 8:16 ` Paolo Ciarrocchi 2008-08-26 8:24 ` Eric Raible 2008-08-26 8:45 ` Paolo Ciarrocchi 2008-08-26 9:44 ` Paolo Ciarrocchi 2008-08-26 18:13 ` Junio C Hamano 2008-08-27 7:58 ` Paolo Ciarrocchi [not found] ` <402731c90808270121t5c09efd1m3b60a1ad15f8f705@mail.gmail.com> 2008-08-27 8:26 ` Paolo Ciarrocchi 2008-08-27 18:06 ` Junio C Hamano 2008-08-28 13:03 ` Paolo Ciarrocchi
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).