From 57c294081ea06e2833ca8e957c560e5e05693624 Mon Sep 17 00:00:00 2001 From: Waldir Pimenta Date: Sat, 7 Jan 2017 01:43:53 +0000 Subject: [PATCH] git-bisect: add page (#1227) --- pages/common/git-bisect.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 pages/common/git-bisect.md diff --git a/pages/common/git-bisect.md b/pages/common/git-bisect.md new file mode 100644 index 0000000000..4f22514b3d --- /dev/null +++ b/pages/common/git-bisect.md @@ -0,0 +1,20 @@ +# git bisect + +> Use binary search to find the commit that introduced a bug. +> Git automatically jumps back and forth in the commit graph to progressively narrow down the faulty commit. + +- Start a bisect session on a commit range bounded by a known buggy commit, and a known clean (typically older) one: + +`git bisect start {{bad_commit}} {{good_commit}}` + +- For each commit that `git bisect` selects, mark it as "bad" or "good" after testing it for the issue: + +`git bisect {{good|bad}}` + +- After `git bisect` pinpoints the faulty commit, end the bisect session and return to the previous branch: + +`git bisect reset` + +- Skip a commit during a bisect (e.g. one that fails the tests due to a different issue): + +`git bisect skip`