Source Code Management

SCM, also known as revision control or version control, basically means keeping all of your source code and other project artifacts in a central repository that maintains a complete version history of every single file.

There are both centralized and distributed flavors of version control systems. We introduce the basic concepts using a centralized system because they are more widely used. Later in the chapter we discuss the minor differences between the two flavors and why one may suit your team better than the other.

Though each SCM system has its own nomenclature, especially for the more advanced set of commands, there are several basic operations common to all systems. Whenever you want to get the current code from an existing project, you can check out a version of that repository. You can then add, modify, and remove files by checking in changes, and you can also update, which downloads the changes that the rest of your team has made to the repository since your checkout or last update.

Benefits

Versioning is the most basic and important capability an SCM system provides. The SCM system stores a complete revision history of every change made to every file. Each modification is assigned a revision number, and you can access prior versions in a multitude of convenient ways. If you check in a change and then discover some unintended consequences, it is easy to revert to the previous working version.

If you discover a bug, you can temporarily go back to a version ...

Get The Art of Lean Software Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.