Slightly More Advanced Git techniques
<p><pre><code>    $ git bisect start
    $ git bisect good <sha>
    $ git bisect bad master
    git will do all the hard work for you. You just have to run your tests at each point that git prompts you, and tell it whether it passed or not:
    $ git bisect bad (or good)
</code></pre>
Props to the author for describing 'git bisect', which is a big time saver; but I'm always surprised that articles like this don't go on to mention the even more amazing 'git bisect run', which <i>automates</i> the "run your tests at each point and tell it whether it passed" part:<p><pre><code>    $ git bisect start
    $ git bisect good <sha>
    $ git bisect bad master
    $ git bisect run rspec spec/path/to/failing_spec.rb
    ... wait a bit ...
    5243cafebabe is the last bad commit
</code></pre>
You can give it any shell command, and it'll automatically bisect, run the command, mark the current commit as good or bad depending on the shell return code of the command, then bisect again, etc.<p>It's right there in the man page, but for some reason seems to be little known (or at least talked about).