Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unbounded git bisect

Tags:

git

git-bisect

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."?

like image 702
Timmmm Avatar asked Oct 15 '25 15:10

Timmmm


1 Answers

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.

like image 53
Enrico Campidoglio Avatar answered Oct 18 '25 10:10

Enrico Campidoglio



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!