aboutsummaryrefslogtreecommitdiff
path: root/docs/contribution/using-git-bisect.md
blob: ea6135b26fc94f07edb3d345fe7bb77efe86320b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Using Git Bisect

Git bisect is a very useful tool for debugging issues that you can't find the root of, specifically when you know a period in the commit history where that issue did not exist.

How git bisect works is by binary searching through the commit history marking commits as good or bad until you reach the history responsible for the issue at hand.

To start using it you must do:
```sh
git bisect start
git bisect good <GOOD COMMIT HASH>
git bisect bad <BAD COMMIT HASH>
```

The bisect will begin, it will perform a binary search and put you at a specific commit, if the commit still has the bug then run:
```sh
git bisect bad
```
If the commit doesn't have the bug then run:
```sh
git bisect good
```
When done it will stop at the responsible commit for which you can investigate to see whats causing the issue.

For more documentation on git bisect see: https://git-scm.com/docs/git-bisect