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

[PATCH] user-manual: fix branch names in examples

From
JFJ. Bruce Fields <bfields@fieldses.org>
Date
May 14, 2007, 16:05 UTC
Message-ID
<20070514160507.GB20736@fieldses.org>
In-Reply-To
<20070514160335.GA20736@fieldses.org>

Thanks to Frank Lichtenheld for pointing out inconsistent use of branch names in a couple examples.

Add a little more example output while I'm at it.

At some point actually it might be good for someone to figure out a good example to use consistently throughout the manual and tutorials; it might make them a little easier to read.

Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
---
 Documentation/user-manual.txt |   18 +++++++++++-------
 1 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
index 9fc2bba..5fb86f2 100644
--- a/Documentation/user-manual.txt
+++ b/Documentation/user-manual.txt
@@ -701,7 +701,7 @@ Suppose you want to know how many commits you've made on "mybranch"
 since it diverged from "origin":
 
 -------------------------------------------------
-$ git log --pretty=oneline origin..maint | wc -l
+$ git log --pretty=oneline origin..mybranch | wc -l
 -------------------------------------------------
 
 Alternatively you may often see this sort of thing done with the
@@ -709,7 +709,7 @@ lower-level command gitlink:git-rev-list[1], which just lists the SHA1's
 of all the given commits:
 
 -------------------------------------------------
-$ git rev-list origin..maint | wc -l
+$ git rev-list origin..mybranch | wc -l
 -------------------------------------------------
 
 [[checking-for-equal-branches]]
@@ -849,19 +849,23 @@ a07157ac624b2524a059a3414e99f6f44bebc1e7 refs/heads/master
 1e87486ae06626c2f31eaa63d26fc0fd646c8af2 refs/heads/tutorial-fixes
 -------------------------------------------------
 
-We can get just the branch-head names, and remove "maint", with
+We can get just the branch-head names, and remove "master", with
 the help of the standard utilities cut and grep:
 
 -------------------------------------------------
-$ git show-ref --heads | cut -d' ' -f2 | grep -v '^refs/heads/maint'
+$ git show-ref --heads | cut -d' ' -f2 | grep -v '^refs/heads/master'
+refs/heads/core-tutorial
+refs/heads/maint
+refs/heads/tutorial-2
+refs/heads/tutorial-fixes
 -------------------------------------------------
 
-And then we can ask to see all the commits reachable from maint
+And then we can ask to see all the commits reachable from master
 but not from these other heads:
 
 -------------------------------------------------
-$ gitk maint --not $( git show-ref --heads | cut -d' ' -f2 |
-				grep -v '^refs/heads/maint' )
+$ gitk master --not $( git show-ref --heads | cut -d' ' -f2 |
+				grep -v '^refs/heads/master' )
 -------------------------------------------------
 
 Obviously endless variations are possible; to see all commits
-- 
1.5.1.4.19.g69e2
Previous: J. Bruce FieldsNext: Junio C Hamano
Message 3 of 5 in “Re: [PATCH 08/10] user-manual: add a "counting commits" example”
  1. Frank LichtenheldMay 14, 2007
  2. J. Bruce FieldsMay 14, 2007
  3. user-manual: fix branch names in examplesJ. Bruce Fields, May 14, 2007
  4. Junio C HamanoMay 14, 2007
  5. J. Bruce FieldsMay 14, 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.