diff options
author | Junio C Hamano <gitster@pobox.com> | 2008-07-08 17:55:47 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-07-09 02:12:24 -0700 |
commit | 049716b370f2cebdbdeb278eb2a8c4eff8ed0acd (patch) | |
tree | ce392fdd134fc4b4b5257c5f6aa2922a0074db0a /Documentation | |
parent | e84fb2ff75f861a708ea5a914883e178a845f4ef (diff) | |
download | git-049716b370f2cebdbdeb278eb2a8c4eff8ed0acd.tar.gz |
branch --merged/--no-merged: allow specifying arbitrary commit
"git-branch --merged" is a handy way to list all the branches that have
already been merged to the current branch, but it did not allow checking
against anything but the current branch. Having to switch branches only
to list the branches that are merged with another branch made the feature
practically useless.
This updates the option parser so that "git branch --merged next" is
accepted when you are on 'master' branch.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/git-branch.txt | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt index 0fd58083eb..450f90368f 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=<length> | --no-abbrev]] - [--contains <commit>] +'git-branch' [--color | --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' (-m | -M) [<oldbranch>] <newbranch> 'git-branch' (-d | -D) [-r] <branchname>... 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 <commit>`, 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 <commit> argument defaults to +'HEAD' (i.e. the tip of the current branch). In its 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>. |