Categories

Oct 16, 2019 in Git
Q: What is Git bisect? How can you use it to determine the source of a (regression) bug?

1 Answer

Oct 16, 2019
Git bisect is used to find the commit that introduced a bug by using binary search. The command for Git bisect is

git bisect <subcommand> <options>

Now since you have mentioned the command above explain to them what this command will do.

This command uses a binary search algorithm to find which commit in your project’s history introduced a bug. You use it by first telling it a “bad” commit that is known to contain the bug, and a “good” commit that is known to be before the bug was introduced. Then Git bisect picks a commit between those two endpoints and asks you whether the selected commit is “good” or “bad”. It continues narrowing down the range until it finds the exact commit that introduced the change.
Click here to read more about GIT
Click here to read more about Insurance

Related questions

Madanswer
Feb 17 in Git
Sep 5 in Git
May 21 in Git
...