Simple but often overlooked tech nuggets

Simple but often overlooked tech nuggets

Git bisect

Duc Trinh's photo
Duc Trinh
·Oct 4, 2021·

1 min read

Play this article

Why you need it?

A feature is broken, but was working fine before. There has been a long history of commits and you need to find which commit introduced the bug.

Start

git bisect start KNOWN_BAD_COMMIT KNOWN_GOOD_COMMIT~

Issue still exists?

Yes: $ git bisect bad
No: $ git bisect good

When Done:

git bisect reset

Ref: stackoverflow.com/questions/4713088/how-to-..