Subversion is a source control system – an excellent accompaniment to software development especially in a team setting. When working with a number of people, it is likely that at one time or another there will be collisions – for example at the moment a project I am working on has a team making some amendments requested by the client for a website. Subversion is handling it all well but the main template files and stylesheets are colliding often as everyone is making changes.
Commit First!
The collision will only occur if you check in a change and someone else has already changed that line in a file. To avoid getting a collision in your working copy, the best thing to do is to commit your change before the other person does.
This approach of commit early, commit often will help you to develop more smoothly without the interruptions of a collision and without struggling with lots and lots of merged files when you’ve left it too long between commits. Additionally you’ll have more checkpoints in your own development history so if you need to go back a few steps, the repository will be able to help you whereas if you didn’t check in, it won’t!
That’s my tip for the day – on a day in a place where many people are bug fixing a single project!