doc: git bisect: clarify the usage of the synopsis vs actual command
The difference between a synopsis and an actual command is that the synopsis is a more abstract representation of the command, which may include placeholders for arguments and options. The actual command is the specific instance of the command with all the arguments and options filled in. The formatting of an actual command is a code block, with the command prefixed by a dollar sign ($) to indicate that it is a command to be run in the terminal. It can also include comments with a hash sign (#) to explain the command or provide additional information, just like in a regular terminal session. Signed-off-by: Jean-Noël Avila <jn.avila@free.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jean-Noël Avila committed
May 25, 2026 at 10:28 UTC
ed31e2872a7306f52de1e2b9ab0065b9d91f3338
1 file changed
+9
-10
Documentation/git-bisect.adoc
+9
-10
@@ -96,9 +96,8 @@ Bisect reset
96
After a bisect session, to clean up the bisection state and return to
97
the original `HEAD`, issue the following command:
98
99
-------------------------------------------------
100
-$ git bisect reset
101
-------------------------------------------------
99
+[synopsis]
100
+git bisect reset
101
102
By default, this will return your tree to the commit that was checked
103
out before `git bisect start`. (A new `git bisect start` will also do
@@ -108,7 +107,8 @@ With an optional argument, you can return to a different commit
107
instead:
108
109
[synopsis]
111
-$ git bisect reset <commit>
110
+git bisect reset <commit>
111
+
112
113
For example, `git bisect reset bisect/bad` will check out the first
114
bad revision, while `git bisect reset HEAD` will leave you on the
@@ -174,13 +174,13 @@ For example, if you are looking for a commit that introduced a
174
performance regression, you might use
175
176
------------------------------------------------
177
-git bisect start --term-old fast --term-new slow
177
+$ git bisect start --term-old fast --term-new slow
178
------------------------------------------------
179
180
Or if you are looking for the commit that fixed a bug, you might use
181
182
------------------------------------------------
183
-git bisect start --term-new fixed --term-old broken
183
+$ git bisect start --term-new fixed --term-old broken
184
------------------------------------------------
185
186
Then, use `git bisect <term-old>` and `git bisect <term-new>` instead
@@ -328,11 +328,10 @@ Bisect run
328
If you have a script that can tell if the current source code is good
329
or bad, you can bisect by issuing the command:
330
331
-------------
332
-$ git bisect run my_script arguments
333
-------------
331
+[synopsis]
332
+git bisect run <cmd> [<arg>...]
333
335
-Note that the script (`my_script` in the above example) should exit
334
+Note that _<cmd>_ run with _<arg>_ should exit
335
with code 0 if the current source code is good/old, and exit with a
336
code between 1 and 127 (inclusive), except 125, if the current source
337
code is bad/new.