Git Bisect, Cherry-pick, and Submodule Cheat Sheet/Start bisect with good and bad revisions

Initialize bisect and mark boundaries.

Section: Bisect Workflows

Start bisect with good and bad revisions

bash
bash
git bisect start <bad_commit> <good_commit>
Explanation

Fastest way to launch a bisect session when both endpoints are already known.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Bisect Workflows
Mark current commit as good
Tell bisect the current checked-out commit does not contain the bug.
OpenIn sheetbashsame section
Mark current commit as bad
Tell bisect the current checked-out commit contains the bug.
OpenIn sheetbashsame section
Automate bisect with a test script
Let Git drive bisect using a command exit code.
OpenIn sheetbashsame section
End bisect session
Return the repository to the original branch state.
OpenIn sheetbashsame section
Skip an untestable bisect revision
Tell bisect to avoid the current commit.
OpenIn sheetbashsame section
Cherry-pick one commit
Apply the changes introduced by one commit onto the current branch.
OpenIn sheetbash1 tag match