X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=Documentation%2Fgit-branch.txt;h=6103d62fe3dca23c78b16dbdbb5ba231a6b39bf7;hb=3ea95d2b0e6fa63e66de24a5084e217102ab9e8a;hp=39cd5d961f4696c36b3050c880af413c95da9282;hpb=1ceb95c8041cad1c25c73fd08e8c0c7ee28cf704;p=git.git diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt index 39cd5d961..6103d62fe 100644 --- a/Documentation/git-branch.txt +++ b/Documentation/git-branch.txt @@ -8,24 +8,27 @@ git-branch - List, create, or delete branches SYNOPSIS -------- [verse] -'git-branch' [--color | --no-color] [-r | -a] [--merged | --no-merged] - [-v [--abbrev= | --no-abbrev]] - [--contains ] -'git-branch' [--track | --no-track] [-l] [-f] [] -'git-branch' (-m | -M) [] -'git-branch' (-d | -D) [-r] ... +'git branch' [--color | --no-color] [-r | -a] + [-v [--abbrev= | --no-abbrev]] + [(--merged | --no-merged | --contains) []] +'git branch' [--track | --no-track] [-l] [-f] [] +'git branch' (-m | -M) [] +'git branch' (-d | -D) [-r] ... DESCRIPTION ----------- -With no arguments given a list of existing branches -will be shown, 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 -contains the named commit (in other words, the branches whose -tip commits are descendant of the named commit). -With `--merged`, only branches merged into HEAD will be listed, and -with `--no-merged` only branches not merged into HEAD will be listed. + +With no arguments, existing branches are listed, 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 contains the named commit +(in other words, the branches whose tip commits are descendant 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. Missing argument defaults to +'HEAD' (i.e. the tip of the current branch). In its second form, a new branch named will be created. It will start out with a head equal to the one given as . @@ -37,7 +40,7 @@ working tree to it; use "git checkout " to switch to the new branch. When a local branch is started off a remote branch, git sets up the -branch so that linkgit:git-pull[1] 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. @@ -54,7 +57,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 remote repository or if linkgit:git-fetch[1] was configured not to fetch +in 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 clean up all obsolete remote-tracking branches. @@ -107,14 +110,14 @@ OPTIONS Display the full sha1s in output listing rather than abbreviating them. --track:: - When creating a new branch, set up configuration so that git-pull + When creating a new branch, set up configuration so that 'git-pull' will automatically retrieve data from the start point, which must be 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 " explicitly. This behavior is the default when the start point is a remote branch. Set the branch.autosetupmerge configuration variable to `false` if you want - git-checkout and git-branch to always behave as if '--no-track' were + 'git-checkout' and 'git-branch' to always behave as if '--no-track' were given. Set it to `always` if you want this behavior when the start-point is either a local or remote branch.