TortoiseGit Manual

Bisect

if you want to find out which revision introduced a bug, you can use the bisect functionality. Right click on a folder to pop up the context menu and then select the command TortoiseGitBisect start. A dialog will pop up:

Figure 2.39. Bisect start

Bisect start


Enter the last known good revision and the first or one known bad (this is normally HEAD).

After hitting OK, GIT will perform a binary search for the first faulty revision: Git switches to a revision in the middle. Now you can test this revision.

TortoiseGit now provides three new options in the context menu:

Figure 2.40. Bisect options

Bisect options


If this revision is OK, hit TortoiseGitBisect good , otherwise hit TortoiseGitBisect bad Git will proceed with the binary search and switches to the "next" revision, so that you can test it. This goes on until the faulty revision is found or you abort this operation by clicking on TortoiseGitBisect reset (this will reset the bisect process and switch out your previous branch/HEAD).

Selecting revisions

If a revision cannot be tested, or you want to go on with a different one, you can easily go to the log and (hard) reset the current HEAD to a revision you like.

You can find more information at the section called “git-bisect(1)”