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

[PATCH] Clarify the git-branch documentation of default start-point

From
Martin Nordholts <enselic@gmail.com>
Date
Jun 18, 2009, 05:41 UTC
Message-ID
<1245303673.24201.3.camel@localhost.localdomain>

For someone not deeply into git it is easy to assume that start-point of git-branch will deafult to origin/remotebranch when executing the following command sequence:

  git checkout origin/remotebranch
  git branch localbranch
This change clarifies the git-branch documentation regarding this.
---
 Documentation/git-branch.txt |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt
index ae201de..426f707 100644
--- a/Documentation/git-branch.txt
+++ b/Documentation/git-branch.txt
@@ -148,7 +148,10 @@ start-point is either a local or remote branch.
 <start-point>::
 	The new branch will be created with a HEAD equal to this.  It may
 	be given as a branch name, a commit-id, or a tag.  If this option
-	is omitted, the current branch is assumed.
+	is omitted, the current branch is assumed.  Note that checking
+	out a remote branch does not make it the current branch.  If a
+	remote branch is desired as start-point it must be an explicity
+	specified.
 
 <oldbranch>::
 	The name of an existing branch to rename.
-- 
1.6.0.6
Next: Junio C Hamano
Message 1 of 6 in “Clarify the git-branch documentation of default start-point”
  1. Clarify the git-branch documentation of default start-pointMartin Nordholts, Jun 18, 2009
  2. Junio C HamanoJun 18, 2009
  3. Martin NordholtsJun 18, 2009
  4. Junio C HamanoJun 18, 2009
  5. Martin NordholtsJun 18, 2009
  6. Michael J GruberJun 18, 2009

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.