Loading...
So today, something happened at work. Suddenly, the typecheck that used to take roughly 60 seconds...
git bisect.
The command essentially lets you find a bad commit between a known "good" commit and a "bad" commit. But one thing that is crucial for using this effectively is having a clean commit history with atomic commits.Working with atomic git commits just means your commits are of the smallest possible size. Each commit does one, and only one, simple thing that can be summed up in a simple sentence.Btw, if you feel you need to add an "and" to your commit message, that should be two commits.
Also, if a commit is too large, if it breaks something, you know the commit is at fault, but you don't know which part of it.Luckily, my teammates are pretty good at following basic git practices, so all our commits were properly described and atomic. The history looked something like this (not the real one, just an example):