From d318f3dada1b16aeefabc4917556838c906bb229 Mon Sep 17 00:00:00 2001 From: Waldir Pimenta Date: Wed, 4 Jan 2017 16:08:54 +0000 Subject: [PATCH] git-bisect: add page --- pages/common/git-bisect.md | 21 +++++++++++++++++++++ 1 file changed, 21 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 00000000000000..fa8ea74f58767f --- /dev/null +++ b/pages/common/git-bisect.md @@ -0,0 +1,21 @@ +# 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 section by passing a known good commit and a known bad commit: + +`git bisect start {{bad_commit}} {{good_commit}}` + +- For each commit that `git bisect` selects, mark it as "bad" or "good": + +`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 causes a broken build due to another issue): + +`git bisect skip` +