DevOps 2 Answers . 1 Upvoted
DevOps 1 Answers . 1 Upvoted
DevOps 1 Answers . 0 Upvoted
DevOps 1 Answers . 1 Upvoted
DevOps 1 Answers . 0 Upvoted
DevOps1 Answers . 0 Upvoted
DevOps1 Answers . 1 Upvoted
DevOps2 Answers . 1 Upvoted
DevOps1 Answers . 1 Upvoted
DevOps1 Answers . 2 Upvoted
DevOps0 Answers . 0 Upvoted
Can you please explain about Git bisect?
I read few articales but not clear about it.
Kapil Kapil Best Answer 2 years ago
The idea behind
git bisect
is to perform a binary search in the history to find a particular regression. Imagine that you have the following development history:You know that your program is not working properly at the
current
revision, and that it was working at the revision0
. So the regression was likely introduced in one of the commits1
,2
,3
,4
,5
,current
.You could try to check out each commit, build it, check if the regression is present or not. If there are a large number of commits, this can take a long time. This is a linear search. We can do better by doing a binary search. This is what the
git bisect
command does. At each step it tries to reduce the number of revisions that are potentially bad by half.