Being organized and tracking changes are two very critical parts to developing, curating, and maintaining code. The use of a source code version control system is extremely important for developers, whether they are working independently or as part of a larger team. There are three primary approaches to version control: local, centralized and distributed. Important questions to ask when selecting a version control system can include the following:

  • Who will use the version control system at my company?
  • Is any information contained within the source of a proprietary or secure nature?
  • Will anyone outside of my company use this code? (see Open Source and Licensing)
  • Will access to the repository be required from different machines or locations?
  • What is the rate of change of my code?
  • How is the version control system being backed up or replicated?

Local version control is easily relatable: create a directory on a machine and copy data or files into it. These local systems evolve into systems that incorporate databases to track changes and commits. While simple to instantiate, local version control systems suffer from several drawbacks including backup and replication, and the inability to share code with a larger community.

Centralized version control expands on local version control by moving the repository to a centralized location, and granting access to the code repository for users within an organization. Subversion, Visual Source Safe and CVS are good examples of centralized version control systems. While this approach solves the issue of granting access to larger teams for code collaboration, it still fails to address failure scenarios of the version control system repository, whether it is housed on a file server, storage array, or other resource. Losing the version control server constitutes a code stop for all developers working on projects within the system.

Distributed version control takes centralized version control a step further. Respositories and code are distributed amongst different servers, which can be distributed between multiple servers or data centers, placed in the cloud, or modeled as a software service (SaaS) offering. Git is a good example of a distributed version control system, and is discussed in the next section. Considerations when using a distributed version control system typically focus around access, and whether or not code should be stored locally within an organization or be put onto a cloud-based repository such as GitHub.