Documentation: minor grammatical fixes in git-branch.txt.
Signed-off-by: David J. Mellor <dmellor@whistlingcat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>maint
parent
b89510f024
commit
e5ac1217eb
|
@ -18,19 +18,19 @@ SYNOPSIS
|
||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
With no arguments, existing branches are listed, the current branch will
|
With no arguments, existing branches are listed and the current branch will
|
||||||
be highlighted with an asterisk. Option `-r` causes the remote-tracking
|
be highlighted with an asterisk. Option `-r` causes the remote-tracking
|
||||||
branches to be listed, and option `-a` shows both.
|
branches to be listed, and option `-a` shows both.
|
||||||
|
|
||||||
With `--contains`, shows only the branches that contains the named commit
|
With `--contains`, shows only the branches that contain the named commit
|
||||||
(in other words, the branches whose tip commits are descendant of the
|
(in other words, the branches whose tip commits are descendants of the
|
||||||
named commit). With `--merged`, only branches merged into the named
|
named commit). With `--merged`, only branches merged into the named
|
||||||
commit (i.e. the branches whose tip commits are reachable from 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
|
commit) will be listed. With `--no-merged` only branches not merged into
|
||||||
the named commit will be listed. Missing <commit> argument defaults to
|
the named commit will be listed. If the <commit> argument is missing it
|
||||||
'HEAD' (i.e. the tip of the current branch).
|
defaults to 'HEAD' (i.e. the tip of the current branch).
|
||||||
|
|
||||||
In its second form, a new branch named <branchname> will be created.
|
In the command's second form, a new branch named <branchname> will be created.
|
||||||
It will start out with a head equal to the one given as <start-point>.
|
It will start out with a head equal to the one given as <start-point>.
|
||||||
If no <start-point> is given, the branch will be created with a head
|
If no <start-point> is given, the branch will be created with a head
|
||||||
equal to that of the currently checked out branch.
|
equal to that of the currently checked out branch.
|
||||||
|
@ -57,9 +57,9 @@ has a reflog then the reflog will also be deleted.
|
||||||
|
|
||||||
Use -r together with -d to delete remote-tracking branches. Note, that it
|
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
|
only makes sense to delete remote-tracking branches if they no longer exist
|
||||||
in remote repository or if 'git-fetch' was configured not to fetch
|
in the remote repository or if 'git-fetch' was configured not to fetch
|
||||||
them again. See also 'prune' subcommand of linkgit:git-remote[1] for way to
|
them again. See also the 'prune' subcommand of linkgit:git-remote[1] for a
|
||||||
clean up all obsolete remote-tracking branches.
|
way to clean up all obsolete remote-tracking branches.
|
||||||
|
|
||||||
|
|
||||||
OPTIONS
|
OPTIONS
|
||||||
|
@ -83,7 +83,7 @@ OPTIONS
|
||||||
Move/rename a branch and the corresponding reflog.
|
Move/rename a branch and the corresponding reflog.
|
||||||
|
|
||||||
-M::
|
-M::
|
||||||
Move/rename a branch even if the new branchname already exists.
|
Move/rename a branch even if the new branch name already exists.
|
||||||
|
|
||||||
--color::
|
--color::
|
||||||
Color branches to highlight current, local, and remote branches.
|
Color branches to highlight current, local, and remote branches.
|
||||||
|
@ -103,17 +103,17 @@ OPTIONS
|
||||||
Show sha1 and commit subject line for each head.
|
Show sha1 and commit subject line for each head.
|
||||||
|
|
||||||
--abbrev=<length>::
|
--abbrev=<length>::
|
||||||
Alter minimum display length for sha1 in output listing,
|
Alter the sha1's minimum display length in the output listing.
|
||||||
default value is 7.
|
The default value is 7.
|
||||||
|
|
||||||
--no-abbrev::
|
--no-abbrev::
|
||||||
Display the full sha1s in output listing rather than abbreviating them.
|
Display the full sha1s in the output listing rather than abbreviating them.
|
||||||
|
|
||||||
--track::
|
--track::
|
||||||
When creating a new branch, set up configuration so that 'git-pull'
|
When creating a new branch, set up the configuration so that 'git-pull'
|
||||||
will automatically retrieve data from the start point, which must be
|
will automatically retrieve data from the start point, which must be
|
||||||
a branch. Use this if you always pull from the same upstream branch
|
a branch. Use this if you always pull from the same upstream branch
|
||||||
into the new branch, and if you don't want to use "git pull
|
into the new branch, and if you do not want to use "git pull
|
||||||
<repository> <refspec>" explicitly. This behavior is the default
|
<repository> <refspec>" explicitly. This behavior is the default
|
||||||
when the start point is a remote branch. Set the
|
when the start point is a remote branch. Set the
|
||||||
branch.autosetupmerge configuration variable to `false` if you want
|
branch.autosetupmerge configuration variable to `false` if you want
|
||||||
|
@ -149,13 +149,13 @@ OPTIONS
|
||||||
|
|
||||||
<newbranch>::
|
<newbranch>::
|
||||||
The new name for an existing branch. The same restrictions as for
|
The new name for an existing branch. The same restrictions as for
|
||||||
<branchname> applies.
|
<branchname> apply.
|
||||||
|
|
||||||
|
|
||||||
Examples
|
Examples
|
||||||
--------
|
--------
|
||||||
|
|
||||||
Start development off of a known tag::
|
Start development from a known tag::
|
||||||
+
|
+
|
||||||
------------
|
------------
|
||||||
$ git clone git://git.kernel.org/pub/scm/.../linux-2.6 my2.6
|
$ git clone git://git.kernel.org/pub/scm/.../linux-2.6 my2.6
|
||||||
|
@ -167,7 +167,7 @@ $ git checkout my2.6.14
|
||||||
<1> This step and the next one could be combined into a single step with
|
<1> This step and the next one could be combined into a single step with
|
||||||
"checkout -b my2.6.14 v2.6.14".
|
"checkout -b my2.6.14 v2.6.14".
|
||||||
|
|
||||||
Delete unneeded branch::
|
Delete an unneeded branch::
|
||||||
+
|
+
|
||||||
------------
|
------------
|
||||||
$ git clone git://git.kernel.org/.../git.git my.git
|
$ git clone git://git.kernel.org/.../git.git my.git
|
||||||
|
@ -176,21 +176,21 @@ $ git branch -d -r origin/todo origin/html origin/man <1>
|
||||||
$ git branch -D test <2>
|
$ git branch -D test <2>
|
||||||
------------
|
------------
|
||||||
+
|
+
|
||||||
<1> Delete remote-tracking branches "todo", "html", "man". Next 'fetch' or
|
<1> Delete the remote-tracking branches "todo", "html" and "man". The next
|
||||||
'pull' will create them again unless you configure them not to. See
|
'fetch' or 'pull' will create them again unless you configure them not to.
|
||||||
linkgit:git-fetch[1].
|
See linkgit:git-fetch[1].
|
||||||
<2> Delete "test" branch even if the "master" branch (or whichever branch is
|
<2> Delete the "test" branch even if the "master" branch (or whichever branch
|
||||||
currently checked out) does not have all commits from test branch.
|
is currently checked out) does not have all commits from the test branch.
|
||||||
|
|
||||||
|
|
||||||
Notes
|
Notes
|
||||||
-----
|
-----
|
||||||
|
|
||||||
If you are creating a branch that you want to immediately checkout, it's
|
If you are creating a branch that you want to checkout immediately, it is
|
||||||
easier to use the git checkout command with its `-b` option to create
|
easier to use the git checkout command with its `-b` option to create
|
||||||
a branch and check it out with a single command.
|
a branch and check it out with a single command.
|
||||||
|
|
||||||
The options `--contains`, `--merged` and `--no-merged` serves three related
|
The options `--contains`, `--merged` and `--no-merged` serve three related
|
||||||
but different purposes:
|
but different purposes:
|
||||||
|
|
||||||
- `--contains <commit>` is used to find all branches which will need
|
- `--contains <commit>` is used to find all branches which will need
|
||||||
|
|
Loading…
Reference in New Issue