{"thread":{"id":"6204","subject":"Re: [PATCH] Documentation/tutorial: misc updates","startedAt":"2007-01-03T13:50:56Z","lastAt":"2007-01-03T17:31:06Z","messageCount":5,"participants":["Horst H. von Brand","Jakub Narebski","Santi Béjar","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"30749","messageId":"200701031350.l03Doulu015800@laptop13.inf.utfsm.cl","threadId":"6204","inReplyTo":"sbejar@gmail.com","subject":"Re: [PATCH] Documentation/tutorial: misc updates","fromName":"Horst H. von Brand","fromEmail":"vonbrand@inf.utfsm.cl","sentAt":"2007-01-03T13:50:56Z","receivedAt":"2007-01-03T13:50:56Z","isPatch":true,"sender":{"key":"vonbrand@inf.utfsm.cl","avatar":"https://avatars.githubusercontent.com/u/211384?v=4"},"body":"Santi BÃ©jar <sbejar@gmail.com> wrote:\n> Three changes:\n> 1) Teach how to delete a branch with \"git branch -d name\".\n> 2) The first commit does not have a parent.\n> 3) Teach \"git show\" instead of \"git cat-file -p\".\n> ---\n>  Documentation/tutorial.txt |   17 +++++++++++++----\n>  1 files changed, 13 insertions(+), 4 deletions(-)\n> \n> diff --git a/Documentation/tutorial.txt b/Documentation/tutorial.txt\n> index d043e84..f0a5526 100644\n> --- a/Documentation/tutorial.txt\n> +++ b/Documentation/tutorial.txt\n> @@ -222,6 +222,15 @@ $ gitk\n>  \n>  will show a nice graphical representation of the resulting history.\n>  \n> +At this point you could delete the experimental branch with\n> +\n> +------------------------------------------------\n> +$ git branch -d experimental\n> +------------------------------------------------\n> +\n> +This command ensures that the changes in the experimental branch are\n> +already in the current branch.\n> +\n\nHuh? This deletes the branch, it doesn't ensure changes have been saved.\n\n>  If you develop on a branch crazy-idea, then regret it, you can always\n>  delete the branch with\n>  \n> @@ -391,8 +400,8 @@ $ git show HEAD\t\t# the tip of the current branch\n>  $ git show experimental\t# the tip of the \"experimental\" branch\n>  -------------------------------------\n>  \n> -Every commit has at least one \"parent\" commit, which points to the\n> -previous state of the project:\n> +Every commit has at least one \"parent\" commit (except the first),\n> +which points to the previous state of the project:\n\nAnd how can it have more than one parent? If you mention it, better come\nclean about merges (can be explained in detail later).\n\n>  -------------------------------------\n>  $ git show HEAD^  # to see the parent of HEAD\n\nAnd if there are several parents?\n\n> @@ -510,10 +519,10 @@ of the file:\n>  $ git diff v2.5:Makefile HEAD:Makefile.in\n>  -------------------------------------\n\nHEAD:Makefile.in doesn't need HEAD.\n-- \nDr. Horst H. von Brand                   User #22616 counter.li.org\nDepartamento de Informatica                    Fono: +56 32 2654431\nUniversidad Tecnica Federico Santa Maria             +56 32 2654239\nCasilla 110-V, Valparaiso, Chile               Fax:  +56 32 2797513\n"},{"id":"30751","messageId":"engd5e$8fr$1@sea.gmane.org","threadId":"6204","inReplyTo":"200701031350.l03Doulu015800@laptop13.inf.utfsm.cl","subject":"Re: [PATCH] Documentation/tutorial: misc updates","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2007-01-03T14:07:41Z","receivedAt":"2007-01-03T14:07:41Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Horst H. von Brand wrote:\n\n>> +------------------------------------------------\n>> +$ git branch -d experimental\n>> +------------------------------------------------\n>> +\n>> +This command ensures that the changes in the experimental branch are\n>> +already in the current branch.\n>> +\n> \n> Huh? This deletes the branch, it doesn't ensure changes have been saved.\n\nIt ensures that the branch we want to delete is in lineage of\ncurrent branch (otherwise we would have to use -D).\n-- \nJakub Narebski\nWarsaw, Poland\nShadeHawk on #git\n"},{"id":"30752","messageId":"8aa486160701030609g22eadf0brf8743dad5701f315@mail.gmail.com","threadId":"6204","inReplyTo":"200701031350.l03Doulu015800@laptop13.inf.utfsm.cl","subject":"Re: [PATCH] Documentation/tutorial: misc updates","fromName":"Santi Béjar","fromEmail":"sbejar@gmail.com","sentAt":"2007-01-03T14:09:02Z","receivedAt":"2007-01-03T14:09:02Z","isPatch":true,"sender":{"key":"santi@agolina.net","avatar":null},"body":"On 1/3/07, Horst H. von Brand <vonbrand@inf.utfsm.cl> wrote:\n> Santi Béjar <sbejar@gmail.com> wrote:\n> > Three changes:\n> > 1) Teach how to delete a branch with \"git branch -d name\".\n> > 2) The first commit does not have a parent.\n> > 3) Teach \"git show\" instead of \"git cat-file -p\".\n> > ---\n> >  Documentation/tutorial.txt |   17 +++++++++++++----\n> >  1 files changed, 13 insertions(+), 4 deletions(-)\n> >\n> > diff --git a/Documentation/tutorial.txt b/Documentation/tutorial.txt\n> > index d043e84..f0a5526 100644\n> > --- a/Documentation/tutorial.txt\n> > +++ b/Documentation/tutorial.txt\n> > @@ -222,6 +222,15 @@ $ gitk\n> >\n> >  will show a nice graphical representation of the resulting history.\n> >\n> > +At this point you could delete the experimental branch with\n> > +\n> > +------------------------------------------------\n> > +$ git branch -d experimental\n> > +------------------------------------------------\n> > +\n> > +This command ensures that the changes in the experimental branch are\n> > +already in the current branch.\n> > +\n>\n> Huh? This deletes the branch, it doesn't ensure changes have been saved.\n\nIt deletes the branch only if the current branch is fast-forwarding it.\n\nCould be rephrase as:\n\nThis command only delete the experimental branch if it is already\nmerge in the current branch.\n\n>\n> >  If you develop on a branch crazy-idea, then regret it, you can always\n> >  delete the branch with\n> >\n> > @@ -391,8 +400,8 @@ $ git show HEAD           # the tip of the current branch\n> >  $ git show experimental      # the tip of the \"experimental\" branch\n> >  -------------------------------------\n> >\n> > -Every commit has at least one \"parent\" commit, which points to the\n> > -previous state of the project:\n> > +Every commit has at least one \"parent\" commit (except the first),\n> > +which points to the previous state of the project:\n>\n> And how can it have more than one parent? If you mention it, better come\n> clean about merges (can be explained in detail later).\n\nI have not mentined it, I've just added the exception that the\nfirt/root commits have zero parents.\n\n>\n> >  -------------------------------------\n> >  $ git show HEAD^  # to see the parent of HEAD\n>\n> And if there are several parents?\n\nAlready explained before.\n\n>\n> > @@ -510,10 +519,10 @@ of the file:\n> >  $ git diff v2.5:Makefile HEAD:Makefile.in\n> >  -------------------------------------\n>\n> HEAD:Makefile.in doesn't need HEAD.\n\nNot needed if the Makefile.in in the working directory is equal to the\nfile in HEAD.\nBut better explain new things.\n\nSanti\n"},{"id":"30757","messageId":"7vejqcoz7s.fsf@assigned-by-dhcp.cox.net","threadId":"6204","inReplyTo":"8aa486160701030609g22eadf0brf8743dad5701f315@mail.gmail.com","subject":"Re: [PATCH] Documentation/tutorial: misc updates","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-01-03T16:24:23Z","receivedAt":"2007-01-03T16:24:23Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Santi Béjar\" <sbejar@gmail.com> writes:\n\n> On 1/3/07, Horst H. von Brand <vonbrand@inf.utfsm.cl> wrote:\n>> Santi Béjar <sbejar@gmail.com> wrote:\n>> >\n>> > -Every commit has at least one \"parent\" commit, which points to the\n>> > -previous state of the project:\n>> > +Every commit has at least one \"parent\" commit (except the first),\n>> > +which points to the previous state of the project:\n>>\n>> And how can it have more than one parent? If you mention it, better come\n>> clean about merges (can be explained in detail later).\n>\n> I have not mentined it, I've just added the exception that the\n> firt/root commits have zero parents.\n\nWell, it does not matter who originally is at fault ;-).\n\nLet's just do this.\n\ndiff --git a/Documentation/tutorial.txt b/Documentation/tutorial.txt\nindex f0a5526..0cc234f 100644\n--- a/Documentation/tutorial.txt\n+++ b/Documentation/tutorial.txt\n@@ -400,7 +400,7 @@ $ git show HEAD\t\t# the tip of the current branch\n $ git show experimental\t# the tip of the \"experimental\" branch\n -------------------------------------\n \n-Every commit has at least one \"parent\" commit (except the first),\n+Every commit usually has one \"parent\" commit\n which points to the previous state of the project:\n \n -------------------------------------\n\nAfter this paragraph, we say \"merge has more than one\", so it's\nall consistent and presented in the right order.  By the time\nthe reader starts wondering about the initial commit, we've\nshown the use of HEAD^^^^ and HEAD~$n enough that the reader can\nexperiment on his/her own.\n"},{"id":"30763","messageId":"8aa486160701030931mfc14c85tb6815002cac8c6fd@mail.gmail.com","threadId":"6204","inReplyTo":"7vejqcoz7s.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] Documentation/tutorial: misc updates","fromName":"Santi Béjar","fromEmail":"sbejar@gmail.com","sentAt":"2007-01-03T17:31:06Z","receivedAt":"2007-01-03T17:31:06Z","isPatch":true,"sender":{"key":"santi@agolina.net","avatar":null},"body":"On 1/3/07, Junio C Hamano <junkio@cox.net> wrote:\n> \"Santi Béjar\" <sbejar@gmail.com> writes:\n>\n> > On 1/3/07, Horst H. von Brand <vonbrand@inf.utfsm.cl> wrote:\n> >> Santi Béjar <sbejar@gmail.com> wrote:\n> >> >\n> >> > -Every commit has at least one \"parent\" commit, which points to the\n> >> > -previous state of the project:\n> >> > +Every commit has at least one \"parent\" commit (except the first),\n> >> > +which points to the previous state of the project:\n> >>\n> >> And how can it have more than one parent? If you mention it, better come\n> >> clean about merges (can be explained in detail later).\n> >\n> > I have not mentined it, I've just added the exception that the\n> > firt/root commits have zero parents.\n>\n> Well, it does not matter who originally is at fault ;-).\n\nSure, we all try to make git better and better.\n\n>\n> Let's just do this.\n>\n> diff --git a/Documentation/tutorial.txt b/Documentation/tutorial.txt\n> index f0a5526..0cc234f 100644\n> --- a/Documentation/tutorial.txt\n> +++ b/Documentation/tutorial.txt\n> @@ -400,7 +400,7 @@ $ git show HEAD             # the tip of the current branch\n>  $ git show experimental        # the tip of the \"experimental\" branch\n>  -------------------------------------\n>\n> -Every commit has at least one \"parent\" commit (except the first),\n> +Every commit usually has one \"parent\" commit\n>  which points to the previous state of the project:\n>\n>  -------------------------------------\n>\n> After this paragraph, we say \"merge has more than one\", so it's\n> all consistent and presented in the right order.  By the time\n> the reader starts wondering about the initial commit, we've\n> shown the use of HEAD^^^^ and HEAD~$n enough that the reader can\n> experiment on his/her own.\n\nOK here.\n\nSanti\n"}]}