Last active
February 21, 2017 21:06
-
-
Save catm705/0d25d43724c9fd9d342c to your computer and use it in GitHub Desktop.
git BISECT
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
1.) You checkout to the commit that you want to work backwards from | |
Ex. | |
git checkout b434c16c396ae27e0421b6071467138787bd00a7 | |
2.) Then type: | |
git bisect start | |
3.) Refresh browser and check out code to see if it's a good starting place where the code works. | |
4.) If good | |
Ex. | |
git bisect good b434c16c396ae27e0421b6071467138787bd00a7 | |
If not | |
git bisect reset --> and go back further in your git checkout | |
** Then after you find a good commit where the code is working in the way you want: | |
git bisect good b434c16c396ae27e0421b6071467138787bd00a7 --> (The commit sha of the good commit) | |
6.) Right after set the commit sha of where you left off with your code - the "current" sha: | |
git bisect bad 030a594a6aee7f79d8575e777620efd93f1d1085 | |
*** This should be the most current commit on your branch. *** | |
7.) THEN keep doing refreshing your screen and after each time - check the functionality/UI whatever. | |
If it's good - git bisect good | |
If it's bad - git bisect bad | |
* At the end - git will give you a message (below).... | |
31cf355c24e2beb8915d8e9251123869fd962c2f is the first bad commit. | |
^ This is the commit where you should look at the code. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment