6 git-bisect - Find the change that introduced a bug
12 'git bisect' bad <rev>
13 'git bisect' good <rev>
14 'git bisect' reset [<branch>]
15 'git bisect' visualize
20 This command uses 'git-rev-list --bisect' option to help drive
21 the binary search process to find which change introduced a bug,
22 given an old "good" commit object name and a later "bad" commit
25 The way you use it is:
27 ------------------------------------------------
29 git bisect bad # Current version is bad
30 git bisect good v2.6.13-rc2 # v2.6.13-rc2 was the last version
31 # tested that was good
32 ------------------------------------------------
34 When you give at least one bad and one good versions, it will
35 bisect the revision tree and say something like:
37 ------------------------------------------------
38 Bisecting: 675 revisions left to test after this
39 ------------------------------------------------
41 and check out the state in the middle. Now, compile that kernel, and boot
42 it. Now, let's say that this booted kernel works fine, then just do
44 ------------------------------------------------
45 git bisect good # this one is good
46 ------------------------------------------------
50 ------------------------------------------------
51 Bisecting: 337 revisions left to test after this
52 ------------------------------------------------
54 and you continue along, compiling that one, testing it, and depending on
55 whether it is good or bad, you say "git bisect good" or "git bisect bad",
56 and ask for the next bisection.
58 Until you have no more left, and you'll have been left with the first bad
59 kernel rev in "refs/bisect/bad".
61 Oh, and then after you want to reset to the original head, do a
63 ------------------------------------------------
65 ------------------------------------------------
67 to get back to the master branch, instead of being in one of the bisection
68 branches ("git bisect start" will do that for you too, actually: it will
69 reset the bisection state, and before it does that it checks that you're
70 not using some old bisection branch).
72 During the bisection process, you can say
76 to see the currently remaining suspects in `gitk`.
81 Written by Linus Torvalds <torvalds@osdl.org>
85 Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
89 Part of the link:git.html[git] suite