Skip to content

Commit e0b7b07

Browse files
authored
Merge pull request #867 from rpjday/branch_merged
Mention to readers that '--merged' and --no-merged' take commit argum…
2 parents 110e27b + a869a92 commit e0b7b07

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

book/03-git-branching/sections/branch-management.asc

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,17 @@ If you are sure you want to delete it, run 'git branch -D testing'.
5959
----
6060

6161
If you really do want to delete the branch and lose that work, you can force it with `-D`, as the helpful message points out.
62+
63+
[TIP]
64+
====
65+
The options described above, `--merged` and `--no-merged` will, if not given a commit or branch name as an argument, show you what is, respectively, merged or not merged into your _current_ branch.
66+
67+
You can always provide an additional argument to ask about the merge state with respect to some other branch without checking that other branch out first, as in, what is not merged into the `master` branch?
68+
[source,console]
69+
----
70+
$ git checkout testing
71+
$ git branch --no-merged master
72+
topicA
73+
featureB
74+
----
75+
====

0 commit comments

Comments
 (0)