git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Documentation/tutorial: misc updates

From
Horst H. von Brand <vonbrand@inf.utfsm.cl>
Date
Jan 3, 2007, 13:50 UTC
Message-ID
<200701031350.l03Doulu015800@laptop13.inf.utfsm.cl>
In-Reply-To
<sbejar@gmail.com>
Santi Béjar <sbejar@gmail.com> wrote:
Show 25 quoted lines
> Three changes:
> 1) Teach how to delete a branch with "git branch -d name".
> 2) The first commit does not have a parent.
> 3) Teach "git show" instead of "git cat-file -p".
> ---
>  Documentation/tutorial.txt |   17 +++++++++++++----
>  1 files changed, 13 insertions(+), 4 deletions(-)
> 
> diff --git a/Documentation/tutorial.txt b/Documentation/tutorial.txt
> index d043e84..f0a5526 100644
> --- a/Documentation/tutorial.txt
> +++ b/Documentation/tutorial.txt
> @@ -222,6 +222,15 @@ $ gitk
>  
>  will show a nice graphical representation of the resulting history.
>  
> +At this point you could delete the experimental branch with
> +
> +------------------------------------------------
> +$ git branch -d experimental
> +------------------------------------------------
> +
> +This command ensures that the changes in the experimental branch are
> +already in the current branch.
> +
Huh? This deletes the branch, it doesn't ensure changes have been saved.
Show 11 quoted lines
>  If you develop on a branch crazy-idea, then regret it, you can always
>  delete the branch with
>  
> @@ -391,8 +400,8 @@ $ git show HEAD		# the tip of the current branch
>  $ git show experimental	# the tip of the "experimental" branch
>  -------------------------------------
>  
> -Every commit has at least one "parent" commit, which points to the
> -previous state of the project:
> +Every commit has at least one "parent" commit (except the first),
> +which points to the previous state of the project:

And how can it have more than one parent? If you mention it, better come clean about merges (can be explained in detail later).

>  -------------------------------------
>  $ git show HEAD^  # to see the parent of HEAD
And if there are several parents?
> @@ -510,10 +519,10 @@ of the file:
>  $ git diff v2.5:Makefile HEAD:Makefile.in
>  -------------------------------------
HEAD:Makefile.in doesn't need HEAD.
-- 
Dr. Horst H. von Brand                   User #22616 counter.li.org
Departamento de Informatica                    Fono: +56 32 2654431
Universidad Tecnica Federico Santa Maria             +56 32 2654239
Casilla 110-V, Valparaiso, Chile               Fax:  +56 32 2797513
Next: Jakub Narebski
Message 1 of 5 in “Re: [PATCH] Documentation/tutorial: misc updates”
  1. Horst H. von BrandJan 3, 2007
  2. Jakub NarebskiJan 3, 2007
  3. Santi BéjarJan 3, 2007
  4. Junio C HamanoJan 3, 2007
  5. Santi BéjarJan 3, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.