Suppose that I'm going through a git bisect, and after running a git bisect bad
command, my git bisect gets interrupted like so:
$ git bisect bad
Bisecting: 0 revisions left to test after this (roughly 1 step)
error: Your local changes to the following files would be overwritten by checkout:
app/app.iml
Please commit your changes or stash them before you switch branches.
Aborting
I can simply eliminate this file by running:
git checkout -- app/app.iml
which will make my git state clean again.. but I'm not sure how to proceed thereafter (ie to let git bisect continue bisecting).. I believe I've done a git bisect bad
before and it kind of skipped a step or did something i didn't expect it to. I simply want to resume my git bisect operation.. how to do that?
The last thing git bisect good
or git bisect bad
does is run git checkout
on the next commit to test. It's this git checkout
itself that failed.
The revision that git bisect
was attempting to git checkout
is stored in the special ref BISECT_EXPECTED_REV
. You can clean up whatever failed and run git checkout BISECT_EXPECTED_REV
to check it out. You will need to resume any automated or manual testing at this point.
You can always write git bisect log
which will output all the bisect operations done so far.
If you save this output, you can later replay it using git bisect replay <logfile>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With