Skip to content

Commit

Permalink
git-branch.txt: compare --contains, --merged and --no-merged
Browse files Browse the repository at this point in the history
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Lars Hjemli authored and Junio C Hamano committed Apr 21, 2008
1 parent e8b404c commit 9a7ea2b
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions Documentation/git-branch.txt
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,15 @@ OPTIONS
--no-track::
Ignore the branch.autosetupmerge configuration variable.

--contains <commit>::
Only list branches which contain the specified commit.

--merged::
Only list branches which are fully contained by HEAD.

--no-merged::
Do not list branches which are fully contained by HEAD.

<branchname>::
The name of the branch to create or delete.
The new branch name must pass all checks defined by
Expand Down Expand Up @@ -177,6 +186,18 @@ If you are creating a branch that you want to immediately checkout, it's
easier to use the git checkout command with its `-b` option to create
a branch and check it out with a single command.

The options `--contains`, `--merged` and `--no-merged` serves three related
but different purposes:

- `--contains <commit>` is used to find all branches which will need
special attention if <commit> were to be rebased or amended, since those
branches contain the specified <commit>.

- `--merged` is used to find all branches which can be safely deleted,
since those branches are fully contained by HEAD.

- `--no-merged` is used to find branches which are candidates for merging
into HEAD, since those branches are not fully contained by HEAD.

Author
------
Expand Down

0 comments on commit 9a7ea2b

Please sign in to comment.