In this workshop, participants will learn the basics of common Git commands used in various situations. This includes commands which help you examine repo history and state while also learning to manipulate repo history.
Git bisect is an useful built-in tool within git cli that you lets you search a specific commit through binary search. Following shows some situations when git bisect is handy:
When you found a bug but have no idea when it was introduced
When a new feature got introduced but have no idea how to trace back
When there is a performance degrade or improvement but have no idea how to trace back
How can you get started with git bisect?
You start with git bisect start to activate git bisect. Now, fun begins!
Run git bisect bad <SHA ID> where you expect somewhere after a change got introduced
Run git bisect good <SHA ID> where you expect somewhere before a change got introduced. This SHA ID has to happen before a git bisect bad. Now, it will start binary search process by splitting a mid point between bad and good
If you did not find a result, you enter git bisect bad. This will split in half again and search.
If you found a result, enter git bisect good
Lastly, type git bisect reset to terminate git bisect
Let's learn fun git bisect
Git bisect is an useful built-in tool within git cli that you lets you search a specific commit through binary search. Following shows some situations when git bisect is handy:
How can you get started with git bisect?
git bisect start
to activate git bisect. Now, fun begins!git bisect bad <SHA ID>
where you expect somewhere after a change got introducedgit bisect good <SHA ID>
where you expect somewhere before a change got introduced. This SHA ID has to happen before agit bisect bad
. Now, it will start binary search process by splitting a mid point between bad and goodgit bisect bad
. This will split in half again and search.git bisect good
git bisect reset
to terminategit bisect