summaryrefslogtreecommitdiff
path: root/Documentation/git-branch.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/git-branch.txt')
-rw-r--r--Documentation/git-branch.txt20
1 files changed, 14 insertions, 6 deletions
diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt
index 0e83680..903a690 100644
--- a/Documentation/git-branch.txt
+++ b/Documentation/git-branch.txt
@@ -8,10 +8,10 @@ git-branch - List, create, or delete branches
SYNOPSIS
--------
[verse]
-'git branch' [--color | --no-color] [-r | -a]
+'git branch' [--color[=<when>] | --no-color] [-r | -a]
[-v [--abbrev=<length> | --no-abbrev]]
[(--merged | --no-merged | --contains) [<commit>]]
-'git branch' [--track | --no-track] [-l] [-f] <branchname> [<start-point>]
+'git branch' [--set-upstream | --track | --no-track] [-l] [-f] <branchname> [<start-point>]
'git branch' (-m | -M) [<oldbranch>] <newbranch>
'git branch' (-d | -D) [-r] <branchname>...
@@ -38,7 +38,7 @@ working tree to it; use "git checkout <newbranch>" to switch to the
new branch.
When a local branch is started off a remote branch, git sets up the
-branch so that 'git-pull' will appropriately merge from
+branch so that 'git pull' will appropriately merge from
the remote branch. This behavior may be changed via the global
`branch.autosetupmerge` configuration flag. That setting can be
overridden by using the `--track` and `--no-track` options.
@@ -55,7 +55,7 @@ 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
+in the remote repository or if 'git fetch' was configured not to fetch
them again. See also the 'prune' subcommand of linkgit:git-remote[1] for a
way to clean up all obsolete remote-tracking branches.
@@ -76,7 +76,7 @@ OPTIONS
-f::
--force::
Reset <branchname> to <startpoint> if <branchname> exists
- already. Without `-f` 'git-branch' refuses to change an existing branch.
+ already. Without `-f` 'git branch' refuses to change an existing branch.
-m::
Move/rename a branch and the corresponding reflog.
@@ -84,12 +84,14 @@ OPTIONS
-M::
Move/rename a branch even if the new branch name already exists.
---color::
+--color[=<when>]::
Color branches to highlight current, local, and remote branches.
+ The value must be always (the default), never, or auto.
--no-color::
Turn off branch colors, even when the configuration file gives the
default to color output.
+ Same as `--color=never`.
-r::
List or delete (if used with -d) the remote-tracking branches.
@@ -129,6 +131,12 @@ start-point is either a local or remote branch.
Do not set up "upstream" configuration, even if the
branch.autosetupmerge configuration variable is true.
+--set-upstream::
+ If specified branch does not exist yet or if '--force' has been
+ given, acts exactly like '--track'. Otherwise sets up configuration
+ like '--track' would when creating the branch, except that where
+ branch points to is not changed.
+
--contains <commit>::
Only list branches which contain the specified commit.