]> git.ipfire.org Git - thirdparty/git.git/blame - Documentation/git-bisect-script.txt
[PATCH] Make "git resolve" less scary
[thirdparty/git.git] / Documentation / git-bisect-script.txt
CommitLineData
7fc9d69f
JH
1git-bisect-script(1)
2====================
3
4NAME
5----
f85a4191 6git-bisect-script - Find the change that introduced a bug
7fc9d69f
JH
7
8
9SYNOPSIS
10--------
f85a4191
JH
11'git bisect' start
12'git bisect' bad <rev>
13'git bisect' good <rev>
14'git bisect' reset [<branch>]
7fc9d69f
JH
15
16DESCRIPTION
17-----------
f85a4191
JH
18This command uses 'git-rev-list --bisect' option to help drive
19the binary search process to find which change introduced a bug,
20given an old "good" commit object name and a later "bad" commit
21object name.
7fc9d69f 22
f85a4191 23The way you use it is:
7fc9d69f 24
f85a4191
JH
25------------------------------------------------
26git bisect start
27git bisect bad # Current version is bad
28git bisect good v2.6.13-rc2 # v2.6.13-rc2 was the last version
29 # tested that was good
30------------------------------------------------
7fc9d69f 31
f85a4191
JH
32When you give at least one bad and one good versions, it will
33bisect the revision tree and say something like:
34
35------------------------------------------------
36Bisecting: 675 revisions left to test after this
37------------------------------------------------
38
39and check out the state in the middle. Now, compile that kernel, and boot
40it. Now, let's say that this booted kernel works fine, then just do
41
42------------------------------------------------
43git bisect good # this one is good
44------------------------------------------------
45
46which will now say
47
48------------------------------------------------
49Bisecting: 337 revisions left to test after this
50------------------------------------------------
51
52and you continue along, compiling that one, testing it, and depending on
53whether it is good or bad, you say "git bisect good" or "git bisect bad",
54and ask for the next bisection.
55
56Until you have no more left, and you'll have been left with the first bad
57kernel rev in "refs/bisect/bad".
58
59Oh, and then after you want to reset to the original head, do a
60
61------------------------------------------------
62git bisect reset
63------------------------------------------------
64
65to get back to the master branch, instead of being in one of the bisection
66branches ("git bisect start" will do that for you too, actually: it will
67reset the bisection state, and before it does that it checks that you're
68not using some old bisection branch).
7fc9d69f
JH
69
70
71Author
72------
73Written by Linus Torvalds <torvalds@osdl.org>
74
75Documentation
76--------------
77Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
78
79GIT
80---
81Part of the link:git.html[git] suite
82