![Forrest logo](/images/logo.png)
git-bisect:tldr:f3522
The git bisect log
command is used in Git to view the history and results of the "binary search" performed during the git bisect
process. git bisect
is a feature in Git that allows you to efficiently find a specific commit that introduced a bug or a problematic behavior by narrowing down the range of commits to search. It follows a binary search algorithm, where it divides the range of potential commits in half at each step. After performing the git bisect
process, which involves marking specific commits as good (bug-free) or bad (buggy), you can use git bisect log
to display the log of all the steps taken during the binary search. The output of git bisect log
provides a record of the commits visited, their associated information, and whether they were marked as good or bad. It helps to visualize the progression of the search and can be useful for reviewing or sharing the results. Example output of git bisect log
: commit 9a4fce791f9ac38bdd6f81664cf4a52301218e6d Author: John Doe <john@example.com> Date: Mon Oct 11 14:53:28 2021 -0500 This commit is bad commit 348cd3be71670a12a1d75a7b2a02a09801aca4a3 Author: Jane Smith <jane@example.com> Date: Fri Oct 8 09:17:45 2021 -0500 This commit is good Bisecting: 1 revision left to test after this (roughly 1 step)
In this example, the log displays two commits that were visited during the search, one marked as bad and the other as good. It also indicates how many more revisions need to be tested before reaching the final answer. By using git bisect log
, you can easily review the commits that were tested, verify the correctness of your good/bad marking, and potentially identify the exact commit where a bug was introduced.