{"thread":{"id":"14395","subject":"[PATCH] tutorial: prefix the prompts with names alice or bob, to make it clear who is doing what","startedAt":"2008-07-10T16:12:09Z","lastAt":"2008-07-11T02:41:37Z","messageCount":5,"participants":["Ian Katz","Miklos Vajna","Junio C Hamano","Jeff King"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"82827","messageId":"dc5b80bf0807100912rac7b730ga1ac035057d71d64@mail.gmail.com","threadId":"14395","inReplyTo":"alpine.DEB.1.00.0807101654080.18205@racer","subject":"[PATCH] tutorial: prefix the prompts with names alice or bob, to make it clear who is doing what","fromName":"Ian Katz","fromEmail":"ifreecarve@gmail.com","sentAt":"2008-07-10T16:12:09Z","receivedAt":"2008-07-10T16:12:09Z","isPatch":true,"sender":{"key":"ifreecarve@gmail.com","avatar":null},"body":"---\n Documentation/gittutorial.txt |   26 +++++++++++++-------------\n 1 files changed, 13 insertions(+), 13 deletions(-)\n\ndiff --git a/Documentation/gittutorial.txt b/Documentation/gittutorial.txt\nindex e71b561..e4248b6 100644\n--- a/Documentation/gittutorial.txt\n+++ b/Documentation/gittutorial.txt\n@@ -274,7 +274,7 @@ same machine, wants to contribute.\n Bob begins with:\n\n ------------------------------------------------\n-$ git clone /home/alice/project myrepo\n+bob$ git clone /home/alice/project myrepo\n ------------------------------------------------\n\n This creates a new directory \"myrepo\" containing a clone of Alice's\n@@ -285,7 +285,7 @@ Bob then makes some changes and commits them:\n\n ------------------------------------------------\n (edit files)\n-$ git commit -a\n+bob$ git commit -a\n (repeat as necessary)\n ------------------------------------------------\n\n@@ -293,8 +293,8 @@ When he's ready, he tells Alice to pull changes from the rep\nository\n at /home/bob/myrepo.  She does this with:\n\n ------------------------------------------------\n-$ cd /home/alice/project\n-$ git pull /home/bob/myrepo master\n+alice$ cd /home/alice/project\n+alice$ git pull /home/bob/myrepo master\n ------------------------------------------------\n\n This merges the changes from Bob's \"master\" branch into Alice's\n@@ -312,7 +312,7 @@ again.  By defining 'remote' repository shorthand, you can m\nake\n it easier:\n\n ------------------------------------------------\n-$ git remote add bob /home/bob/myrepo\n+alice$ git remote add bob /home/bob/myrepo\n ------------------------------------------------\n\n With this, Alice can perform the first operation alone using the\n@@ -320,7 +320,7 @@ With this, Alice can perform the first operation alone using\n the\n using:\n\n -------------------------------------\n-$ git fetch bob\n+alice$ git fetch bob\n -------------------------------------\n\n Unlike the longhand form, when Alice fetches from Bob using a\n@@ -329,7 +329,7 @@ fetched is stored in a remote tracking branch, in this case\n `bob/master`.  So after this:\n\n -------------------------------------\n-$ git log -p master..bob/master\n+alice$ git log -p master..bob/master\n -------------------------------------\n\n shows a list of all the changes that Bob made since he branched from\n@@ -339,14 +339,14 @@ After examining those changes, Alice\n could merge the changes into her master branch:\n\n -------------------------------------\n-$ git merge bob/master\n+alice$ git merge bob/master\n -------------------------------------\n\n This `merge` can also be done by 'pulling from her own remote\n tracking branch', like this:\n\n -------------------------------------\n-$ git pull . remotes/bob/master\n+alice$ git pull . remotes/bob/master\n -------------------------------------\n\n Note that git pull always merges into the current branch,\n@@ -355,7 +355,7 @@ regardless of what else is given on the command line.\n Later, Bob can update his repo with Alice's latest changes using\n\n -------------------------------------\n-$ git pull\n+bob$ git pull\n -------------------------------------\n\n Note that he doesn't need to give the path to Alice's repository;\n@@ -364,7 +364,7 @@ repository in the repository configuration, and that locatio\nn is\n used for pulls:\n\n -------------------------------------\n-$ git config --get remote.origin.url\n+bob$ git config --get remote.origin.url\n /home/alice/project\n -------------------------------------\n\n@@ -376,7 +376,7 @@ Git also keeps a pristine copy of Alice's master branch unde\nr the\n name \"origin/master\":\n\n -------------------------------------\n-$ git branch -r\n+bob$ git branch -r\n  origin/master\n -------------------------------------\n\n@@ -384,7 +384,7 @@ If Bob later decides to work from a different host, he can s\ntill\n perform clones and pulls using the ssh protocol:\n\n -------------------------------------\n-$ git clone alice.org:/home/alice/project myrepo\n+bob$ git clone alice.org:/home/alice/project myrepo\n -------------------------------------\n\n Alternatively, git has a native protocol, or can use rsync or http;\n--\n1.5.3.7\n"},{"id":"82829","messageId":"20080710164520.GZ10347@genesis.frugalware.org","threadId":"14395","inReplyTo":"dc5b80bf0807100912rac7b730ga1ac035057d71d64@mail.gmail.com","subject":"Re: [PATCH] tutorial: prefix the prompts with names alice or bob, to make it clear who is doing what","fromName":"Miklos Vajna","fromEmail":"vmiklos@frugalware.org","sentAt":"2008-07-10T16:45:20Z","receivedAt":"2008-07-10T16:45:20Z","isPatch":true,"sender":{"key":"vmiklos@frugalware.org","avatar":"https://gravatar.com/avatar/401c1cbbb3a5d13e650c691a2c71d6fd0b80df1a01bc74d9f1972675dd58f2bd?d=mp&s=160"},"body":"On Thu, Jul 10, 2008 at 12:12:09PM -0400, Ian Katz <ifreecarve@gmail.com> wrote:\n> ---\n>  Documentation/gittutorial.txt |   26 +++++++++++++-------------\n>  1 files changed, 13 insertions(+), 13 deletions(-)\n\nPlease add your Sign-off when sending patches, see\nDocumentation/SubmittingPatches.\n"},{"id":"82833","messageId":"dc5b80bf0807101127q63e3132fw207baf0d88db3d9d@mail.gmail.com","threadId":"14395","inReplyTo":"20080710164520.GZ10347@genesis.frugalware.org","subject":"Re: [PATCH] tutorial: prefix the prompts with names alice or bob, to make it clear who is doing what","fromName":"Ian Katz","fromEmail":"ifreecarve@gmail.com","sentAt":"2008-07-10T18:27:30Z","receivedAt":"2008-07-10T18:27:30Z","isPatch":true,"sender":{"key":"ifreecarve@gmail.com","avatar":null},"body":" Signed-off-by: Ian Katz <ifreecarve@gmail.com>\n\n---\n Documentation/gittutorial.txt |   26 +++++++++++++-------------\n 1 files changed, 13 insertions(+), 13 deletions(-)\n\ndiff --git a/Documentation/gittutorial.txt b/Documentation/gittutorial.txt\nindex e71b561..e4248b6 100644\n--- a/Documentation/gittutorial.txt\n+++ b/Documentation/gittutorial.txt\n@@ -274,7 +274,7 @@ same machine, wants to contribute.\n Bob begins with:\n\n ------------------------------------------------\n-$ git clone /home/alice/project myrepo\n+bob$ git clone /home/alice/project myrepo\n ------------------------------------------------\n\n This creates a new directory \"myrepo\" containing a clone of Alice's\n@@ -285,7 +285,7 @@ Bob then makes some changes and commits them:\n\n ------------------------------------------------\n (edit files)\n-$ git commit -a\n+bob$ git commit -a\n (repeat as necessary)\n ------------------------------------------------\n\n@@ -293,8 +293,8 @@ When he's ready, he tells Alice to pull changes from the rep\nository\n at /home/bob/myrepo.  She does this with:\n\n ------------------------------------------------\n-$ cd /home/alice/project\n-$ git pull /home/bob/myrepo master\n+alice$ cd /home/alice/project\n+alice$ git pull /home/bob/myrepo master\n ------------------------------------------------\n\n This merges the changes from Bob's \"master\" branch into Alice's\n@@ -312,7 +312,7 @@ again.  By defining 'remote' repository shorthand, you can m\nake\n it easier:\n\n ------------------------------------------------\n-$ git remote add bob /home/bob/myrepo\n+alice$ git remote add bob /home/bob/myrepo\n ------------------------------------------------\n\n With this, Alice can perform the first operation alone using the\n@@ -320,7 +320,7 @@ With this, Alice can perform the first operation alone using\n the\n using:\n\n -------------------------------------\n-$ git fetch bob\n+alice$ git fetch bob\n -------------------------------------\n\n Unlike the longhand form, when Alice fetches from Bob using a\n@@ -329,7 +329,7 @@ fetched is stored in a remote tracking branch, in this case\n `bob/master`.  So after this:\n\n -------------------------------------\n-$ git log -p master..bob/master\n+alice$ git log -p master..bob/master\n -------------------------------------\n\n shows a list of all the changes that Bob made since he branched from\n@@ -339,14 +339,14 @@ After examining those changes, Alice\n could merge the changes into her master branch:\n\n -------------------------------------\n-$ git merge bob/master\n+alice$ git merge bob/master\n -------------------------------------\n\n This `merge` can also be done by 'pulling from her own remote\n tracking branch', like this:\n\n -------------------------------------\n-$ git pull . remotes/bob/master\n+alice$ git pull . remotes/bob/master\n -------------------------------------\n\n Note that git pull always merges into the current branch,\n@@ -355,7 +355,7 @@ regardless of what else is given on the command line.\n Later, Bob can update his repo with Alice's latest changes using\n\n -------------------------------------\n-$ git pull\n+bob$ git pull\n -------------------------------------\n\n Note that he doesn't need to give the path to Alice's repository;\n@@ -364,7 +364,7 @@ repository in the repository configuration, and that locatio\nn is\n used for pulls:\n\n -------------------------------------\n-$ git config --get remote.origin.url\n+bob$ git config --get remote.origin.url\n /home/alice/project\n -------------------------------------\n\n@@ -376,7 +376,7 @@ Git also keeps a pristine copy of Alice's master branch unde\nr the\n name \"origin/master\":\n\n -------------------------------------\n-$ git branch -r\n+bob$ git branch -r\n   origin/master\n -------------------------------------\n\n@@ -384,7 +384,7 @@ If Bob later decides to work from a different host, he can s\ntill\n perform clones and pulls using the ssh protocol:\n\n -------------------------------------\n-$ git clone alice.org:/home/alice/project myrepo\n+bob$ git clone alice.org:/home/alice/project myrepo\n -------------------------------------\n\n Alternatively, git has a native protocol, or can use rsync or http;\n--\n1.5.3.7\n"},{"id":"82850","messageId":"7vskuho3lm.fsf_-_@gitster.siamese.dyndns.org","threadId":"14395","inReplyTo":"dc5b80bf0807101127q63e3132fw207baf0d88db3d9d@mail.gmail.com","subject":"[PATCH] tutorial: clarify \"pull\" is \"fetch + merge\"","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-07-10T21:01:57Z","receivedAt":"2008-07-10T21:01:57Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"The document says that a fetch with a configured remote stores what are\nfetched in the remote tracking branches \"Unlike the longhand form\", but\nthere is no longhand form \"fetch\" demonstrated earlier.\n\nThis adds a missing demonstration of the longhand form, and a new\nparagraph to explain why some people might want to fetch before pull.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n\n Documentation/gittutorial.txt |   28 +++++++++++++++++++++++++++-\n 1 files changed, 27 insertions(+), 1 deletions(-)\n\ndiff --git a/Documentation/gittutorial.txt b/Documentation/gittutorial.txt\nindex e71b561..38807f3 100644\n--- a/Documentation/gittutorial.txt\n+++ b/Documentation/gittutorial.txt\n@@ -306,6 +306,32 @@ is the default.)\n The \"pull\" command thus performs two operations: it fetches changes\n from a remote branch, then merges them into the current branch.\n \n+Note that in general, Alice would want her local changes committed before\n+initiating this \"pull\".  If Bob's work conflicts with what Alice did since\n+their histories forked, Alice will use her working tree and the index to\n+resolve conflicts, and existing local changes will interfere with the\n+conflict resolution process (git will still perform the fetch but will\n+refuse to merge --- Alice will have to get rid of her local changes in\n+some way and pull again when this happens).\n+\n+Alice can peek what Bob did without merging first, using the \"fetch\"\n+command; this allows Alice to inspect what bob did, using a special\n+symbol \"FETCH_HEAD\", in order to determine if he has anything worth\n+pulling, like this:\n+\n+------------------------------------------------\n+$ git fetch /home/bob/myrepo master\n+$ git log -p ..FETCH_HEAD\n+------------------------------------------------\n+\n+This operation is safe even if Alice has uncommitted local changes.\n+\n+After inspecting what Bob did, if there is nothing urgent, Alice may\n+decide to continue working without pulling from Bob.  If Bob's history\n+does have something Alice would immediately need, Alice may choose to\n+stash her work-in-progress first, do a \"pull\", and then finally unstash\n+her work-in-progress on top of the resulting history.\n+\n When you are working in a small closely knit group, it is not\n unusual to interact with the same repository over and over\n again.  By defining 'remote' repository shorthand, you can make\n@@ -315,7 +341,7 @@ it easier:\n $ git remote add bob /home/bob/myrepo\n ------------------------------------------------\n \n-With this, Alice can perform the first operation alone using the\n+With this, Alice can perform the first part of \"pull\" operation alone using the\n 'git-fetch' command without merging them with her own branch,\n using:\n \n"},{"id":"82912","messageId":"20080711024137.GA14967@sigill.intra.peff.net","threadId":"14395","inReplyTo":"7vskuho3lm.fsf_-_@gitster.siamese.dyndns.org","subject":"Re: [PATCH] tutorial: clarify \"pull\" is \"fetch + merge\"","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-07-11T02:41:37Z","receivedAt":"2008-07-11T02:41:37Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Jul 10, 2008 at 02:01:57PM -0700, Junio C Hamano wrote:\n\n> This adds a missing demonstration of the longhand form, and a new\n> paragraph to explain why some people might want to fetch before pull.\n\nA few English/typo nits below.\n\n> +Alice can peek what Bob did without merging first, using the \"fetch\"\n\ns/peek/& at/\n\n> +command; this allows Alice to inspect what bob did, using a special\n\ns/bob/\\u&/\n\n> -With this, Alice can perform the first operation alone using the\n> +With this, Alice can perform the first part of \"pull\" operation alone using the\n\nShould be either 'the \"pull\" operation' or 'a \"pull\" operation'.\n\n-Peff\n"}]}