Introduction to Version Control
Last updated
Was this helpful?
Last updated
Was this helpful?
Version Control is an element that is critical to the success of your . 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.
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.
There are two main types of 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 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:
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
With version control, there are many benefits including:
Address merge conflicts upfront and prevents overwriting of code
Complete Code Reviews
Improve the quality of work.
Remote repositories allow us to share our changes with other members of the team. They can be on a private server, on a different computer than yours, or hosted on a different service. Wherever yours is hosted, you'll need to be able to sync your local repository with the remote repository frequently. To start sharing changes with others, you have to push them to a remote repository. This will cause the remote repository to update and synchronize with your local repository.
At one point in time, will not just be declarative