git-branch.txt: compare --contains, --merged and --no-merged
Signed-off-by: Lars Hjemli <hjemli@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Lars Hjemli committed
Apr 18, 2008 at 00:27 UTC
9a7ea2b1f3484bb2a4bbd0b538e5a38df0356701
1 file changed
+21
Documentation/git-branch.txt
+21
@@ -120,6 +120,15 @@ OPTIONS
120
--no-track::
121
Ignore the branch.autosetupmerge configuration variable.
122
123
+--contains <commit>::
124
+ Only list branches which contain the specified commit.
125
+
126
+--merged::
127
+ Only list branches which are fully contained by HEAD.
128
+
129
+--no-merged::
130
+ Do not list branches which are fully contained by HEAD.
131
+
132
<branchname>::
133
The name of the branch to create or delete.
134
The new branch name must pass all checks defined by
@@ -177,6 +186,18 @@ If you are creating a branch that you want to immediately checkout, it's
186
easier to use the git checkout command with its `-b` option to create
187
a branch and check it out with a single command.
188
189
+The options `--contains`, `--merged` and `--no-merged` serves three related
190
+but different purposes:
191
+
192
+- `--contains <commit>` is used to find all branches which will need
193
+ special attention if <commit> were to be rebased or amended, since those
194
+ branches contain the specified <commit>.
195
+
196
+- `--merged` is used to find all branches which can be safely deleted,
197
+ since those branches are fully contained by HEAD.
198
+
199
+- `--no-merged` is used to find branches which are candidates for merging
200
+ into HEAD, since those branches are not fully contained by HEAD.
201
202
Author
203
------