DEV Community

Discussion on: Debugging with Git

Collapse
 
belinde profile image
Franco Traversaro

I don't understand: how does git bisect check if a commit is good or bad? Does have an integration with unit tests?

Collapse
 
maestromac profile image
Mac Siri

There's no integration. It would be up to you to evaluate if a commit is good or bad by either running a test, starting the app locally, or playing with it on repl/console. Git bisect reduces the number of commits you would have to go through with binary search.

Collapse
 
hoelzro profile image
Rob Hoelz

You can also use git bisect run to have Git run your tests - that way if your test suite takes a while, you can leave and make yourself a sandwich or something. When you get back, Git will have done all the work for you!

Thread Thread
 
maestromac profile image
Mac Siri

Well this change everything. Thanks!