Situation: Some commit (on master, but not necessarily head of master) has broken things, but it's a big commit and it's not clear what part broke things.
% git checkout master
% git checkout -b bisect-branch
% git revert <offending commit>(test here to make sure reverting fixed your problem)
% git bisect start
% git bisect good
% while [ "`git diff master`" != "" ]; do echo -e "y\nq\n" | git checkout -p master; git commit -m 'partial undo'; done(test here to make sure we've recreated your problem)
% git bisect badNow just follow the bisect.
The while line has broken your commit up into small chunks, one commit per chunk. If a chunk has actually broken syntax (so you can't test either way), you can git bisect skip.
You can also s/master/any-reference-branch-or-tag-or-sha/g. And you can use s\ny\nq\n if you want even smaller chunks (but more risk of syntax errors).