Merge refs/heads/master from paulus
[git.git] / Documentation / git-bisect-script.txt
1 git-bisect-script(1)
2 ====================
3
4 NAME
5 ----
6 git-bisect-script - Find the change that introduced a bug
7
8
9 SYNOPSIS
10 --------
11 'git bisect' start
12 'git bisect' bad <rev>
13 'git bisect' good <rev>
14 'git bisect' reset [<branch>]
15
16 DESCRIPTION
17 -----------
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
21 object name.
22
23 The way you use it is:
24
25 ------------------------------------------------
26 git bisect start
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 ------------------------------------------------
31
32 When you give at least one bad and one good versions, it will
33 bisect the revision tree and say something like:
34
35 ------------------------------------------------
36 Bisecting: 675 revisions left to test after this
37 ------------------------------------------------
38
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
41
42 ------------------------------------------------
43 git bisect good                 # this one is good
44 ------------------------------------------------
45
46 which will now say
47
48 ------------------------------------------------
49 Bisecting: 337 revisions left to test after this
50 ------------------------------------------------
51
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.
55
56 Until you have no more left, and you'll have been left with the first bad
57 kernel rev in "refs/bisect/bad".
58
59 Oh, and then after you want to reset to the original head, do a
60
61 ------------------------------------------------
62 git bisect reset
63 ------------------------------------------------
64
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).
69
70
71 Author
72 ------
73 Written by Linus Torvalds <torvalds@osdl.org>
74
75 Documentation
76 --------------
77 Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
78
79 GIT
80 ---
81 Part of the link:git.html[git] suite
82