Last active
April 25, 2024 10:22
-
-
Save wisq/0fa021df52a3bd2485ac to your computer and use it in GitHub Desktop.
Revisions
-
wisq revised this gist
Jul 25, 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 @@ -18,6 +18,6 @@ Situation: Some commit (on master, but not necessarily head of master) has broke Now just follow the bisect. The `while` line has broken your commit up into small chunks, one commit per chunk. If a chunk has actually broken syntax (so you can't test either way), you can `git bisect skip`. You can also `s/master/any-reference-branch-or-tag-or-sha/g`. And you can use `s\ny\nq\n` if you want even smaller chunks (but more risk of syntax errors). -
wisq revised this gist
Jul 25, 2014 . 1 changed file with 4 additions and 2 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 @@ -9,7 +9,7 @@ Situation: Some commit (on master, but not necessarily head of master) has broke ```sh % git bisect start % git bisect good % while [ "`git diff master`" != "" ]; do echo -e "y\nq\n" | git checkout -p master; git commit -m 'partial undo'; done ``` (test here to make sure we've recreated your problem) ```sh @@ -18,4 +18,6 @@ Situation: Some commit (on master, but not necessarily head of master) has broke Now just follow the bisect. The `while` line has broken your commit up into small chunks. If a chunk has actually broken syntax (so you can't test either way), you can `git bisect skip`. You can also `s/master/any-reference-branch-or-tag-or-sha/g`. And you can use `s\ny\nq\n` if you want even smaller chunks (but more risk of syntax errors). -
wisq revised this gist
Jul 25, 2014 . 1 changed file with 3 additions and 3 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 @@ -1,18 +1,18 @@ Situation: Some commit (on master, but not necessarily head of master) has broken things, but it's a big commit and it's not clear what part broke things. ```sh % git checkout master % git checkout -b bisect-branch % git revert <offending commit> ``` (test here to make sure reverting fixed your problem) ```sh % git bisect start % git bisect good % while [ `git diff master | wc -l` -gt 0 ]; do echo -e "y\nq\n" | git co -p master; git commit -m 'partial undo'; done ``` (test here to make sure we've recreated your problem) ```sh % git bisect bad ``` -
wisq created this gist
Jul 25, 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,21 @@ Situation: Some commit (on master, but not necessarily head of master) has broken things, but it's a big commit and it's not clear what part broke things. ```shell % git checkout master % git checkout -b bisect-branch % git revert <offending commit> ``` (test here to make sure reverting fixed your problem) ```shell % git bisect start % git bisect good % while [ `git diff master | wc -l` -gt 0 ]; do echo -e "y\nq\n" | git co -p master; git commit -m 'partial undo'; done ``` (test here to make sure we've recreated your problem) ```shell % git bisect bad ``` Now just follow the bisect. You can also `s/master/any-reference-branch-or-tag-or-sha/g`.