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