>One of the things over the last six months that has changed and improved the quality of code I produce, has been using git and Hudson. I wrote a while ago about how you can setup local builds of a system using git and Hudson. The advantage here is that Hudson will automatically run if there are changes in your local git repository. I can’t tell you how many times when working on various projects, both commercial and open source this has saved me. Especially when I’m not working on a project that is tied to one particular IDE.
Just because it works in my IDE doesn’t necessarily mean it’ll work in the build. Having Hudson run the build locally, helps catch the errors that I would have pushed otherwise to the main repository. There is an a fundamental requirement of Test Driven development, to run the tests often. Hudson and Git have allowed me to do that with more ease. Once I know the local build from Hudson succeeds, I’m fairly confident that I can push the changes to the main repo.
The other advantage git lets me do is work in a branch and then merge back. I can setup the local build to pull from that branch and when I’m ready, I can either rebase my commits in the branch, or bring them in as they are. By integrating and running a build locally before I push to the main repository, I’m again fairly certain I’m not breaking the build or anybody else.
Another thing running Hudson locally enforces, it makes sure that your build can be run by anybody on any machine. It’s not tied to a particular platform. One thing many eclipse builds still struggle with.
For those that are still on the fence, waiting for eGit to get to the point of CVS integration at eclipse, you really are missing some good productivity and code quality gains. I’ve been using eGit off and on for some projects, and it really is very close to hitting that 80/20 threshold. It really does need the critical Pull ability, and a Recursive Merge. Otherwise it is almost ready for daily use.
If you are an eclipse user, and still haven’t given git a chance, you really should.