Recall & Review
beginner
What is the purpose of
git bisect run?It automates the process of finding a bad commit by running a test script on each commit during the bisect.
Click to reveal answer
beginner
How do you start a bisect session to find a bad commit?
Use
git bisect start, then mark a known bad commit with git bisect bad and a known good commit with git bisect good.Click to reveal answer
intermediate
What should the test script used with
git bisect run return?It should return 0 if the commit is good, and non-zero if the commit is bad.
Click to reveal answer
intermediate
What happens if the test script fails or returns an unexpected code during
git bisect run?Git will stop the bisect process and report an error, requiring manual intervention.
Click to reveal answer
beginner
How do you end a bisect session after finding the bad commit?
Run
git bisect reset to return to the original branch and clean up the bisect state.Click to reveal answer
What command starts an automated bisect with a test script?
✗ Incorrect
git bisect run runs the test script automatically on each commit.What exit code should a test script return to mark a commit as good?
✗ Incorrect
Exit code 0 means success, so the commit is good.
Which command marks a commit as bad in a bisect session?
✗ Incorrect
git bisect bad marks the current commit as bad.What does
git bisect reset do?✗ Incorrect
It cleans up bisect state and returns to the branch you were on.
If the test script returns a non-zero code, what does git bisect assume?
✗ Incorrect
Non-zero exit code means the commit is bad.
Explain how
git bisect run automates finding a bad commit.Think about how a script can test each commit automatically.
You got /5 concepts.
Describe the steps to perform a manual bisect and then automate it with a script.
Combine manual marking with automation.
You got /5 concepts.