When you work in teams , you have to coordinate. That means discussing and planning, of course, but even with the best of intentions, you can still end up with conflicts. You may have made some brilliant changes to the codeonly to find them all wiped out by mistake when another programmer uploads his new version of a file.
Source control stops those kinds of problems by controlling access to code and by maintaining a history of the changes that have been made so things aren't destroyed unintentionally. Storing a history of your code is very powerfulnot only can you compare a new ( buggy ) file against an older one, you can also revert to a previous version in case things have gone awry.
Source control also gives you the ability to coordinate the simultaneous development of several different versions of your softwarefor example, you might want to work on both a release version and a new beta version. You can do that using branches , as we're going to see in this chapter.