Unbounded git bisect

73 Views Asked by At

Is it possible to use git bisect with one of the bounds unspecified. For example if I discover something broken on HEAD but I suspect it worked at some point in the past, is there a way to tell git "try one commit ago, if that doesn't work try two commits ago, then four, then eight, etc."?

1

There are 1 best solutions below

1
On

Not really; git-bisect operates on a fixed range of commits, so you need to give it two boundaries up front.

If you aren't sure how far back in history the good commit is, your best bet is to start with a larger range than what you consider likely. For example, if you suspect that things were good some time last week, set the start commit to two weeks ago.

After all, going through a large number of commits with as few steps as possible is what git-bisect does best.