So it seems that git doesn't have a pre-push hook, which could be used for running tests for examp...
So you've decided to give MonoDevelop a go and what would be a better way to start than writ...
It's been some time now that I'v been looking at backbone.js, playing with the framework and tryi...
a few weeks ago Derick Bailey posted about using jasmine-jquery fixtures to test your view tem...
Recently there's been a lot of talk on knockout.js and backbone.js, two frameworks that provide u...
So it seems that git doesn't have a pre-push hook, which could be used for running tests for example, making sure that no code would be pushed to your origin master without verifying the code doesn't fail any tests. Apparently, a couple of patches have been submitted (one of them was by Scott Chacon), but denied unfortunately. So I set out to find another way of doing just that. One of the ideas I had was using pre-commit and post-merge hooks to run only on master to make sure master is never soiled by code failing tests, but it just felt somewhat clumsy and a kind of a workaround, not a real solution.
I have therefore went with a different idea, inspired by what Chacon himself said on the thread linked above. The idea is simply using an alias such as 'send' to run a script and if the script (running the tests) ends successfully, we allow the push itself. Below are the steps to achieve this (for a .NET project, obviously):
This is pretty much it. From now on, whenever you wish to push your changes just use the send alias like so: git send origin master and you'll see your tests running; if they fail, the push will not go through, otherwise it'll all just work as expected.