diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt index 1940256..872bb3e 100644 --- a/Documentation/git-branch.txt +++ b/Documentation/git-branch.txt @@ -11,51 +11,50 @@ SYNOPSIS 'git branch' [--color[=] | --no-color] [-r | -a] [-v [--abbrev= | --no-abbrev]] [(--merged | --no-merged | --contains) []] -'git branch' [--set-upstream | --track | --no-track] [-l] [-f] [] +'git branch' [--set-upstream | --track | --no-track] [-l] [-f] [] 'git branch' (-m | -M) [] 'git branch' (-d | -D) [-r] ... 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. +With no arguments, local branches are listed and the current branch is +highlighted with an asterisk. Option `-r` lists remote-tracking +branches, and option `-a` lists both. -With `--contains`, shows only the branches that contain the named commit +With `--contains`, show 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 argument is missing it -defaults to 'HEAD' (i.e. the tip of the current branch). +commit) are listed. With `--no-merged` only branches not merged into +the named commit are listed. If the argument is missing it +defaults to 'HEAD', the tip of the current branch. -The command's second form creates a new branch head named -which points to the current 'HEAD', or if given. - -Note that this will create the new branch, but it will not switch the +The second form of the command creates a new branch head named +which points to the current 'HEAD', or if given. +Note that this creates the new branch, but does not switch the 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 '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. +`branch.autosetupmerge` configuration flag. You can override the +flag using the `--track` and `--no-track` options. -With a '-m' or '-M' option, will be renamed to . +With the '-m' or '-M' command, is renamed to . If had a corresponding reflog, it is renamed to match , and a reflog entry is created to remember the branch -renaming. If exists, -M must be used to force the rename -to happen. +renaming. If exists, -M can be used to forwe overwriting +it. -With a `-d` or `-D` option, `` 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. +With the `-d` or `-D` command, `` is deleted. You may +specify more than one branch to delete. If the branch currently +has a reflog, the reflog is 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 -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. @@ -79,7 +78,7 @@ OPTIONS -f:: --force:: - Reset to if exists + Reset to if exists already. Without `-f` 'git branch' refuses to change an existing branch. -m:: @@ -119,8 +118,8 @@ OPTIONS -t:: --track:: When creating a new branch, set up configuration to mark the - start-point branch as "upstream" from the new branch. This - configuration will tell git to show the relationship between the + branch as "upstream" from the new branch. This + configuration tells git to show the relationship between the two branches in `git status` and `git branch -v`. Furthermore, it directs `git pull` without arguments to pull from the upstream when the new branch is checked out. @@ -133,13 +132,13 @@ start-point is either a local or remote branch. --no-track:: Do not set up "upstream" configuration, even if the - branch.autosetupmerge configuration variable is true. + branch.autosetupmerge configuration flag 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. + points to is not changed. --contains :: Only list branches which contain the specified commit. @@ -158,7 +157,7 @@ start-point is either a local or remote branch. linkgit:git-check-ref-format[1]. Some of these checks may restrict the characters allowed in a branch name. -:: +:: 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 current HEAD will be used instead.