Skip to content

Commit 9c9410e

Browse files
sbejarJunio C Hamano
authored andcommitted
Documentation/tutorial: misc updates
- Teach how to delete a branch with "git branch -d name". - Usually a commit has one parent; merge has more. - Teach "git show" instead of "git cat-file -p". Signed-off-by: Santi Béjar <sbejar@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
1 parent c1d179f commit 9c9410e

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

Documentation/tutorial.txt

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,15 @@ $ gitk
232232

233233
will show a nice graphical representation of the resulting history.
234234

235+
At this point you could delete the experimental branch with
236+
237+
------------------------------------------------
238+
$ git branch -d experimental
239+
------------------------------------------------
240+
241+
This command ensures that the changes in the experimental branch are
242+
already in the current branch.
243+
235244
If you develop on a branch crazy-idea, then regret it, you can always
236245
delete the branch with
237246

@@ -401,8 +410,8 @@ $ git show HEAD # the tip of the current branch
401410
$ git show experimental # the tip of the "experimental" branch
402411
-------------------------------------
403412

404-
Every commit has at least one "parent" commit, which points to the
405-
previous state of the project:
413+
Every commit usually has one "parent" commit
414+
which points to the previous state of the project:
406415

407416
-------------------------------------
408417
$ git show HEAD^ # to see the parent of HEAD
@@ -520,10 +529,10 @@ of the file:
520529
$ git diff v2.5:Makefile HEAD:Makefile.in
521530
-------------------------------------
522531

523-
You can also use "git cat-file -p" to see any such file:
532+
You can also use "git show" to see any such file:
524533

525534
-------------------------------------
526-
$ git cat-file -p v2.5:Makefile
535+
$ git show v2.5:Makefile
527536
-------------------------------------
528537

529538
Next Steps

0 commit comments

Comments
 (0)