From: Jonathan Nieder Date: Fri, 09 Oct 2009 10:19:40 GMT Subject: [PATCH 7/9] Documentation: clarify branch creation Message-ID: <20091009101940.GG16558@progeny.tock> In-Reply-To: <20091009101400.GA16549@progeny.tock> The documentation seems to assume that the starting point for a new branch is the tip of an existing (ordinary) branch, but that is not the most common case. More often, "git branch" is used to begin a branch from a remote-tracking branch, a tag, or an interesting commit (e.g. origin/pu^2). Clarify the language so it can apply to these cases. Signed-off-by: Jonathan Nieder --- Documentation/git-branch.txt | 17 ++++++++++------- 1 files changed, 10 insertions(+), 7 deletions(-) diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt index e8b32a2..990f782 100644 --- a/Documentation/git-branch.txt +++ b/Documentation/git-branch.txt @@ -30,10 +30,11 @@ commit) will be listed. With `--no-merged` only branches not merged into the named commit will be listed. If the argument is missing it defaults to 'HEAD' (i.e. the tip of the current branch). -In the command's second form, a new branch named will be created. -It will start out with a head equal to the one given as . -If no is given, the branch will be created with a head -equal to that of the currently checked out branch. +In the command's second form, creates a new branch named . +The branch will start out with head pointing to the commit +. If no is given, the branch will start +out with head pointing to the tip of the currently checked out branch, +or the currently checked out commit if no branch is checked out. Note that this will create the new branch, but it will not switch the working tree to it; use "git checkout " to switch to the @@ -149,9 +150,11 @@ start-point is either a local or remote branch. may restrict the characters allowed in a branch name. :: - 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. + The new branch head will point to this commit. It may be + given as a branch name, a commit-id, or a tag. If this + option is omitted, the currently checked out branch head + is used, or the current commit if no branch is checked + out. :: The name of an existing branch to rename. -- 1.6.5.rc1.199.g596ec