Skip to main content

Strictly necessary · always on

Remembers this choice in your browser. No tracking.

Spicy Comic #3 – Git Bisect
git

Spicy Comic #3 — Git Bisect

Jovan Ercic··Updated ·1 min read

We all hate searching for the cause of a nasty regression. Git history to the rescue!

We all hate searching for the cause of a nasty regression. There’s no doubt about it. It is time-consuming, frustrating, and it stops you from doing what excites you.

That’s when clean git history comes into play.

Instead of hunting the bug by inspecting or debugging the code, you could find the git commit which introduced the regression. More often than not, it will be obvious why it happened, and what should you do to fix it.

If you know of one good revision and have encountered a bad one, then somewhere in between those two lies the commit which introduced the regression.

Git bisect helps you do the binary search between these two by checking out revisions and asking you to verify if it’s good or bad one.

That’s log(n) of builds, where n is the number of commits between initial good and bad.

For more, consult git-bisect

'Spicy Comic #3'
'Spicy Comic #3'

Check out the previous issue.

Tagged:gitdebuggingengineeringproductivityvelocity
Your Turn

Facing a problem like this one?

Tell us what the business needs to win and who owns it on your side. If it is a fit, a First Build starts within weeks. If it is not, we will tell you why.