-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1617567
commit d318f3d
Showing
1 changed file
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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` | ||
|