A team is facing an issue where a feature that previously worked is now broken. How can git bisect be used to identify the problematic commit?

  • Start the bisect using git bisect start and specify a good and bad commit. Git will automatically check out a commit between them. Run tests, and based on results, mark the commit as good or bad using git bisect good or git bisect bad.
  • Manually check out a commit, run tests, and mark the commit as good or bad using git bisect mark.
  • Use git bisect log to view the history and identify the problematic commit manually.
  • Execute git bisect run to automate the testing process and identify the faulty commit.
Option 1 correctly describes the process of using git bisect to systematically find the commit introducing the issue by marking commits as good or bad based on test results. Other options either involve manual methods or incorrect usage of git bisect.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *