I have been using git as my version control system since beginning with pyherc. I haven’t been using anything really advanced features. Most complex things I have been doing are having couple branches and few merges.
Recently I started thinking that I could try out using pre-commit hook for something useful and created quick and dirty script:
#!/bin/sh nosetests code=$? exit $code
Now, everytime I commit code into my local repository, unit tests are run automatically and commit is aborted if they don’t pass. This is ok for now, since tests take only couple of seconds to run, but I wouldn’t want to use this with test suite that takes 10 seconds.