What do you need before you can use git bisect?
A known bad commit, a known good commit earlier in history, and a way to test the bug at each step, either by hand or with a script. A clean working tree also helps.
Explain it simply
Binary search needs a sorted range with a clear boundary: before it works, after it is broken. If the bug appears and disappears randomly, bisect gives nonsense.
So first make the failure reproducible, such as a failing test or clear manual steps. Then find an old version where it worked, perhaps a release tag. Commit or stash local changes, because Git will check out many commits. Mark the ends and begin.
Example
git stash -u
git bisect start
git bisect bad HEAD
git bisect good v1.2.0What to say in the interview
"I need a reproducible test, one known good commit and one known bad commit, and a clean working tree. If the bug is flaky bisect cannot be trusted."