From: Jonathan Nieder <jrnieder@gmail.com>
To: Konstantin Khomoutov <flatworm@users.sourceforge.net>
Cc: "João Paulo Melo de Sampaio" <jpmelos@gmail.com>,
"GIT Mailing List" <git@vger.kernel.org>,
"Jakub Narebski" <jnareb@gmail.com>
Subject: [PATCH 1/2] Documentation/branch: split description into subsections
Date: Sun, 30 Jan 2011 15:33:55 -0600 [thread overview]
Message-ID: <20110130213355.GB10039@burratino> (raw)
In-Reply-To: <20110130213258.GA10039@burratino>
Add headings for each form of the "git branch" command. Hopefully
this will make the description easier to read straight through without
getting lost and help technical writers to see what needs improvement
in the treatment of each form.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
Documentation/git-branch.txt | 53 +++++++++++++++++++++++------------------
1 files changed, 30 insertions(+), 23 deletions(-)
diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt
index 9106d38..d3eeb94 100644
--- a/Documentation/git-branch.txt
+++ b/Documentation/git-branch.txt
@@ -18,25 +18,30 @@ SYNOPSIS
DESCRIPTION
-----------
-With no arguments, existing branches are listed and the current branch will
-be highlighted with an asterisk. Option `-r` causes the remote-tracking
-branches to be listed, and option `-a` shows both.
+'git branch' [-r | -a]::
+ With no arguments, existing branches are listed and the current
+ branch will be highlighted with an asterisk.
+ Option `-r` causes the remote-tracking branches to be listed,
+ and option `-a` shows both.
-With `--contains`, shows only the branches that contain the named commit
-(in other words, the branches whose tip commits are descendants of the
-named commit). With `--merged`, only branches merged into the named
-commit (i.e. the branches whose tip commits are reachable from the named
-commit) will be listed. With `--no-merged` only branches not merged into
-the named commit will be listed. If the <commit> argument is missing it
-defaults to 'HEAD' (i.e. the tip of the current branch).
-
-The command's second form creates a new branch head named <branchname>
-which points to the current 'HEAD', or <start-point> if given.
+'git branch' (--contains | --merged | --no-merged) [<commit>]::
+ With `--contains`, shows only the branches that contain the
+ named commit (in other words, the branches whose tip commits are
+ descendants of the named commit). With `--merged`, only
+ branches merged into the named commit (i.e. the branches whose
+ tip commits are reachable from the named commit) will be listed.
+ With `--no-merged` only branches not merged into the named
+ commit will be listed. If the <commit> argument is missing it
+ defaults to 'HEAD' (i.e. the tip of the current branch).
+'git branch' <branchname> [<start-point>]::
+ The command's second form creates a new branch head named <branchname>
+ which points to the current 'HEAD', or <start-point> if given.
++
Note that this will create the new branch, but it will not switch the
working tree to it; use "git checkout <newbranch>" to switch to the
new branch.
-
++
When a local branch is started off a remote-tracking branch, git sets up the
branch so that 'git pull' will appropriately merge from
the remote-tracking branch. This behavior may be changed via the global
@@ -44,16 +49,18 @@ the remote-tracking branch. This behavior may be changed via the global
overridden by using the `--track` and `--no-track` options, and
changed later using `git branch --set-upstream`.
-With a '-m' or '-M' option, <oldbranch> will be renamed to <newbranch>.
-If <oldbranch> had a corresponding reflog, it is renamed to match
-<newbranch>, and a reflog entry is created to remember the branch
-renaming. If <newbranch> exists, -M must be used to force the rename
-to happen.
-
-With a `-d` or `-D` option, `<branchname>` will be deleted. You may
-specify more than one branch for deletion. If the branch currently
-has a reflog then the reflog will also be deleted.
+'git branch' (-m | -M) <oldbranch> <newbranch>::
+ With a '-m' or '-M' option, <oldbranch> will be renamed to <newbranch>.
+ If <oldbranch> had a corresponding reflog, it is renamed to match
+ <newbranch>, and a reflog entry is created to remember the branch
+ renaming. If <newbranch> exists, -M must be used to force the rename
+ to happen.
+'git branch' (-d | -D) <branchname>::
+ With a `-d` or `-D` option, `<branchname>` will be deleted. You may
+ specify more than one branch for deletion. If the branch currently
+ has a reflog then the reflog will also be deleted.
++
Use -r together with -d to delete remote-tracking branches. Note, that it
only makes sense to delete remote-tracking branches if they no longer exist
in the remote repository or if 'git fetch' was configured not to fetch
--
1.7.4.rc3
next prev parent reply other threads:[~2011-01-30 21:34 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-30 15:05 Remote branchs -- how can I check them out? João Paulo Melo de Sampaio
2011-01-30 16:05 ` Konstantin Khomoutov
2011-01-30 21:32 ` [RFC/PATCH 0/2] " Jonathan Nieder
2011-01-30 21:33 ` Jonathan Nieder [this message]
2011-01-31 1:55 ` [PATCH 1/2] Documentation/branch: split description into subsections Sverre Rabbelier
2011-01-30 21:35 ` [PATCH 2/2] Documentation/branch: briefly explain what a branch is Jonathan Nieder
2011-01-31 2:51 ` Junio C Hamano
2011-01-31 0:35 ` [RFC/PATCH 0/2] Re: Remote branchs -- how can I check them out? João Paulo Melo de Sampaio
2011-01-30 16:35 ` Jakub Narebski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110130213355.GB10039@burratino \
--to=jrnieder@gmail.com \
--cc=flatworm@users.sourceforge.net \
--cc=git@vger.kernel.org \
--cc=jnareb@gmail.com \
--cc=jpmelos@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).