aboutsummaryrefslogtreecommitdiff
path: root/docs/contribution/using-git-bisect.md
diff options
context:
space:
mode:
author George L. Albany <Megacake1234@gmail.com>2023-09-25 07:26:57 +0200
committer GitHub <noreply@github.com>2023-09-25 07:26:57 +0200
commit24e9f25fe2be11f03a1588e434e0e6fe3f484144 (patch)
tree48e2b2d22cea391ca4b653a8fd2a351657f1b630 /docs/contribution/using-git-bisect.md
parenta579fa30b9faced48499028f32e3ae53d7eeb142 (diff)
parent60b62e370ee566010f88e65df3981125dc17be2d (diff)
Merge pull request #156 from Spartan322/fixup/docs
Diffstat (limited to 'docs/contribution/using-git-bisect.md')
-rw-r--r--docs/contribution/using-git-bisect.md24
1 files changed, 24 insertions, 0 deletions
diff --git a/docs/contribution/using-git-bisect.md b/docs/contribution/using-git-bisect.md
new file mode 100644
index 0000000..ea6135b
--- /dev/null
+++ b/docs/contribution/using-git-bisect.md
@@ -0,0 +1,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 \ No newline at end of file