Skip to content

Commit 75ec4a6

Browse files
committed
branch doc: update description for --list
The paragraph begins with a sample command line `git branch <name>` that has nothing to do with the option being described. Remove it, but use the space to instead show that multiple patterns can be given. Also mention the unfortunate `-l` that can be easily confused with it. Signed-off-by: Junio C Hamano <[email protected]> Reviewed-by: Jonathan Nieder <[email protected]> Reviewed-by: Ævar Arnfjörð Bjarmason <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent b66f3b6 commit 75ec4a6

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

Documentation/git-branch.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,13 @@ This option is only applicable in non-verbose mode.
142142
List both remote-tracking branches and local branches.
143143

144144
--list::
145-
Activate the list mode. `git branch <branchname>` would try to create a branch,
146-
use `git branch --list <pattern>` to list matching branches.
145+
List branches. With optional `<pattern>...`, e.g. `git
146+
branch --list 'maint-*'`, list only the branches that match
147+
the pattern(s).
148+
+
149+
This should not be confused with `git branch -l <branchname>`,
150+
which creates a branch named `<branchname>` with a reflog.
151+
See `--create-reflog` above for details.
147152

148153
-v::
149154
-vv::

0 commit comments

Comments
 (0)