# 4.2.1.bisect

* 1.Introduction
  * Sometimes your project occur some accident (or bug) so that you need to trace back to find out the bug was caused from which commit&#x20;
  * Git provides **git bisect** which was the tool to find the commit efficiently
  * This section records the bisect usage of **TortoiseGit**
* 2.Getting started
  * 1.You must to have idea that Which commit was good (the bug did not occur) and which was bad (the bug did occur) before performing bisect.
  * 2.Open the solution folder and right click on it, choose **TortoiseGit -> Bisect start** ![](https://4137043065-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M4M0G8A3AbgfgoPuWWW%2F-M4M0INTQnUS90ldtPAg%2F-M4M0Oc9FzYfW2kNhR7T%2F123.jpg?generation=1586302932315665\&alt=media)
  * 3.TortoiseGit will prompt a window and you must input the good commit and bad commit that you know. ![](https://4137043065-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M4M0G8A3AbgfgoPuWWW%2F-M4M0INTQnUS90ldtPAg%2F-M4M0OcBe7CCg2BR0mbE%2F1234.jpg?generation=1586302932319584\&alt=media)
  * 4.Input those commits and click OK. ![](https://4137043065-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M4M0G8A3AbgfgoPuWWW%2F-M4M0INTQnUS90ldtPAg%2F-M4M0OcDMSW-6ByV_-iO%2F12345.jpg?generation=1586302932319190\&alt=media)
  * 5.TortoiseGit to the commit between good one and bad one. ![](https://4137043065-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M4M0G8A3AbgfgoPuWWW%2F-M4M0INTQnUS90ldtPAg%2F-M4M0OcFBs61xjyGwSQ-%2F123456.jpg?generation=1586302932049786\&alt=media)
  * 6.Test current commit, mark **Bisect good** if good and vice versa. ![](https://4137043065-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M4M0G8A3AbgfgoPuWWW%2F-M4M0INTQnUS90ldtPAg%2F-M4M0OcHASHN7GgsBq1p%2F1234567.jpg?generation=1586302931976472\&alt=media)
  * 7.Repeat step.6 and TortoiseGit will help you to find the last good one
* 3.Reference
  * <https://tortoisegit.org/docs/tortoisegit/tgit-dug-bisect.html>
