From e8b404c27e98a8d1b0e123fe80ce19efbdbf73d7 Mon Sep 17 00:00:00 2001 From: Lars Hjemli Date: Thu, 17 Apr 2008 22:24:50 +0200 Subject: git-branch: add support for --merged and --no-merged These options filter the output from git branch to only include branches whose tip is either merged or not merged into HEAD. The use-case for these options is when working with integration of branches from many remotes: `git branch --no-merged -a` will show a nice list of merge candidates while `git branch --merged -a` will show the progress of your integration work. Also, a plain `git branch --merged` is a quick way to find local branches which you might want to delete. Signed-off-by: Lars Hjemli Signed-off-by: Junio C Hamano --- Documentation/git-branch.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Documentation/git-branch.txt') diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt index 6f07a17a2c..95e9d0d0be 100644 --- a/Documentation/git-branch.txt +++ b/Documentation/git-branch.txt @@ -8,7 +8,7 @@ git-branch - List, create, or delete branches SYNOPSIS -------- [verse] -'git-branch' [--color | --no-color] [-r | -a] +'git-branch' [--color | --no-color] [-r | -a] [--merged | --no-merged] [-v [--abbrev= | --no-abbrev]] [--contains ] 'git-branch' [--track | --no-track] [-l] [-f] [] @@ -24,6 +24,8 @@ 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. In its second form, a new branch named will be created. It will start out with a head equal to the one given as . -- cgit v1.2.3