Version control
Version control means recording the changes made to a file over time.
Version control enables programmers to see the evolution of files over time and roll back to a certain point in time if needed.
It ensures nothing gets lost, and there’s always a way back to a point when everything was working fine.
Just like a time machine.
Most development teams keep their code base version controlled.
The tools that handle version control are called Version Control Systems (VCS).
In addition to the ability to go back and forth in time, version control systems allow multiple developers to work on the same file simultaneously (from their computers) without being worried if the work of one developer gets overridden by the other.
Distributed Version Control Systems are the most common version control systems.
In DVCS, every developer in the team has a clone of the complete source code and its change history – known as the repository.
On the other hand, every developer has a clone of the repository.
Developers apply the changes to their offline copy and regularly sync (a.k.a push) the changes to a shared remote copy.
Every time a developer pushes their changes to the remote copy, if the code is already updated by another developer, she must pull the latest changes first and try again.
This process ensures developer’s offline copies constantly remain synced with every other developer.
The most popular distributed version control systems are git and Mercurial.
Knowing how to use a version control system is a must in modern development workflows.
Never miss a guide like this!
Disclaimer: This post may contain affiliate links. I might receive a commission if a purchase is made. However, it doesn’t change the cost you’ll pay.