Skip to content

Commit 53d1589

Browse files
mignologitster
authored andcommitted
tutorial: gentler illustration of Alice/Bob workflow using gitk
Update to gitutorial as discussedin the git mailing list: http://marc.info/?t=121969390900002&r=1&w=2 Signed-off-by: Paolo Ciarrocchi <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent d36f867 commit 53d1589

File tree

1 file changed

+28
-1
lines changed

1 file changed

+28
-1
lines changed

Documentation/gittutorial.txt

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,10 +321,37 @@ pulling, like this:
321321

322322
------------------------------------------------
323323
alice$ git fetch /home/bob/myrepo master
324-
alice$ git log -p ..FETCH_HEAD
324+
alice$ git log -p HEAD..FETCH_HEAD
325325
------------------------------------------------
326326

327327
This operation is safe even if Alice has uncommitted local changes.
328+
The range notation HEAD..FETCH_HEAD" means "show everything that is reachable
329+
from the FETCH_HEAD but exclude anything that is reachable from HEAD.
330+
Alice already knows everything that leads to her current state (HEAD),
331+
and reviewing what Bob has in his state (FETCH_HEAD) that she has not
332+
seen with this command
333+
334+
If Alice wants to visualize what Bob did since their histories forked
335+
she can issue the following command:
336+
337+
------------------------------------------------
338+
$ gitk HEAD..FETCH_HEAD
339+
------------------------------------------------
340+
341+
This uses the same two-dot range notation we saw earlier with 'git log'.
342+
343+
Alice may want to view what both of them did since they forked.
344+
She can use three-dot form instead of the two-dot form:
345+
346+
------------------------------------------------
347+
$ gitk HEAD...FETCH_HEAD
348+
------------------------------------------------
349+
350+
This means "show everything that is reachable from either one, but
351+
exclude anything that is reachable from both of them".
352+
353+
Please note that these range notation can be used with both gitk
354+
and "git log".
328355

329356
After inspecting what Bob did, if there is nothing urgent, Alice may
330357
decide to continue working without pulling from Bob. If Bob's history

0 commit comments

Comments
 (0)