]> git.ipfire.org Git - thirdparty/git.git/blob - Documentation/git-bisect-script.txt
Documentaion updates.
[thirdparty/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 'git bisect' visualize
16
17
18 DESCRIPTION
19 -----------
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
23 object name.
24
25 The way you use it is:
26
27 ------------------------------------------------
28 git bisect start
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 ------------------------------------------------
33
34 When you give at least one bad and one good versions, it will
35 bisect the revision tree and say something like:
36
37 ------------------------------------------------
38 Bisecting: 675 revisions left to test after this
39 ------------------------------------------------
40
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
43
44 ------------------------------------------------
45 git bisect good # this one is good
46 ------------------------------------------------
47
48 which will now say
49
50 ------------------------------------------------
51 Bisecting: 337 revisions left to test after this
52 ------------------------------------------------
53
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.
57
58 Until you have no more left, and you'll have been left with the first bad
59 kernel rev in "refs/bisect/bad".
60
61 Oh, and then after you want to reset to the original head, do a
62
63 ------------------------------------------------
64 git bisect reset
65 ------------------------------------------------
66
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).
71
72 During the bisection process, you can say
73
74 git bisect visualize
75
76 to see the currently remaining suspects in `gitk`.
77
78
79 Author
80 ------
81 Written by Linus Torvalds <torvalds@osdl.org>
82
83 Documentation
84 --------------
85 Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
86
87 GIT
88 ---
89 Part of the link:git.html[git] suite
90