Introduction to Version Control
Version Control is an element that is critical to the success of your DevOps pipeline. If a client is not using a Version Control System, it’s important to convince them to adopt one immediately. This article outlines the key reasons for using the Version Control System as your “source of truth,” rather than using the Salesforce org.
What is Version Control?
Version Control is simply the recording of changes to files. By recording changes, you have the ability to recover recorded changes if files are lost or mistakes are made. Additionally, version control allows you to keep files in a more organized structure. With Version Control, you can revert files back to the previous state, compare changes over time, and understand who last modified files.
What are the Version Control Systems out there?
There are two main types of Version Control Systems including the following:
- Centralized Version Control Systems
- Distributed Version Control Systems
With a centralized version control system, all files are stored on a central server. No developers have a copy of all files on a local server. The problem with a central server is that, if the central server crashes, all data from the project is lost. The most popular Version Control System used in Salesforce Development is a Distributed Version Control System. With a Distributed Version Control System, every developer has a copy of all versions of the code on their systems. This enables developers to work offline and not rely on a single location for backups. If the server crashes, there is no threat.
There are many high-quality, free commercial hosting options that can be used for GIT or Mercurial Version Control Systems:
- AWS CodeCommit
- Azure DevOps Server
Impacts of Version Control
Without version control, there are many impacts including:
- No merge process, leading to overwriting of code
- If org is the source of truth, overwritten changes can not be recaptured
- The team is limited in its toolbox
Benefits of Version Control
With version control, there are many benefits including:
- Address merge conflicts upfront and prevents overwriting of code
- Complete Code Reviews
- At one point in time, Salesforce development will not just be declarative
- Improve the quality of work.