Developing with Others
A version control system is of great help in independent developmentand absolutely indispensable when a team of developers is working together. Even if you're planning on collaborating with just one other person, a VCS is the second application you should buy (right after a compiler or an HTML editor, depending on your line of work).
When a VCS is used for collaboration, you still have a private copy of the whole project, and you work with the same protocol of checking files out and in. But in order to see the changes made by your coworkers, you have to periodically synchronize your project, using the sync command. Synchronization applies the changes made by other developers to your own copy of the project. Only those changes that have been checked in are propagated by sync. This way, team members can test and correct their changes until they're happy with themor at least satisfied enough to make their new versions available to othersat which point they check them in.
A typical development cycle might look like this: You decide to implement a new feature, fix a bug, or modify a set of Web pages. You check out the relevant files as the need arisesmaybe with the help of your development environment. You make some changes, test them, and make some more changes.
Meanwhile, your coworkers might be making their own changes. When they check them in, you perform synchronization so that you can test your modifications against their updates. Some systems will notify you about the availability of new versionsothers will let you inquire. Occasionally, other members of your team modify the very files you're working on. A VCS will attempt to merge these changes during synchronization. You should review the results of such a merge to make sure that the system correctly guessed your intentions. In most cases, your changes and your coworkers' changes won't overlap, and the merge process will do the right thing.
Finally, when your task is done, you check in the files you've been working on and thus create a new version of the project. Of course, the VCS makes all these versions of the project available to you. You can restore old versions of any file. You can also look through a file's history; for instance, to find out who introduced the bug you've been chasing for the last couple of days.