-
-
Save myersg86/56138903bca7b52fd6af3b889b54a916 to your computer and use it in GitHub Desktop.
Revisions
-
stevenyap revised this gist
Nov 17, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ You have a git commit in your history that is causing a bug but you do not know which commit it is. Here's how to use git bisect to find the commit that causes the bug. ```sh -
stevenyap revised this gist
Nov 17, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ You have a git commit in your history that is causing a bug but you do not know which commit it is. Here's how to use git bisect to find the commit that causes the bug. ```sh -
stevenyap revised this gist
Nov 17, 2014 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,5 @@ You have a git commit in your history that is causing a bug but you do not know which commit it is. Here's how to use git bisect to find the commit that causes the bug. ```sh # in the git root, start the git bisect -
stevenyap revised this gist
Nov 17, 2014 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -22,7 +22,11 @@ git bisect good git bisect bad # Repeat the above until git tells you which is the bad commit # eg. f5836a61c5e989b972499e5265760519580d3cfe is the first bad commit # Note down your bad commit hash # Upon finishing, then git bisect reset # Work on your bad commit!!! ``` -
stevenyap created this gist
Nov 17, 2014 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,28 @@ You have a git commit in your history that is causing a bug but you do not know which commit it is. Here's how to use git bisect to find the commit that causes the bug. ```sh # in the git root, start the git bisect git bisect start # mark current commit as bad git bisect bad # tell git which is the commit is good (it can be any good commit in the far history) git bisect good <commit-hash> # git will tell you roughly how many revisions you need to find the bad commit # eg. Bisecting: 24 revisions left to test after this (roughly 5 steps) # You are now at a commit that is chosen by git bisect # Run your test to determine if the commit is okay # if commit is okay, then git bisect good # if commit is bad, then git bisect bad # Repeat the above until git tells you which is the bad commit # Upon finishing, then git bisect reset ```