in reply to How to best control non-working code with source control?

I'll echo pc88mxer. The better way is with branching and merging. The workflow goes like this:

  1. Create a branch off of trunk/master/production.
  2. Within that branch, make changes.
  3. Do commits to the branch at appropriate points. It doesn't have to be perfect because it doesn't affect anything in the main line.
  4. When it's back to working, merge the branch in with the other working code.

By the way, if you're looking for "the change that broke it", git-bisect is taylor made for that—if you're using git, of course.