Why Versioning?
Versioning is a tool used to manage the evolution of a software project’s source code over time.
Let’s imagine we have a text file containing phone numbers from people close to us.
Anyone should be able to update his own phone number while still being able to see the same information, so we put this file in a public folder in Google Drive. We can share and access it with a link, and modify it in a collaborative fashion.
We also want to see all the changes made over time. This way, if a phone number doesn’t work, we can still try older ones. For each change, a new version of the file has to be created. We’ve probably all have been in the case where we have to write a report and keep renaming it “report_latestlatestversion.docx”. That’s a typical problem.
If a person has two phone numbers, we want to agree on a single one to use for the sake of clarity. We thus need a process to ensure a single truth to avoid conflicting information to enter our spreadsheet.
Software versioning allows all that, and more, in a single place.
It helps developers collaborate on a complex tree of files while helping to prevent mistakes from entering the code or the production environment.
Each change is authorized, tracked, and can be reverted. When you work on a new feature or need to fix a bug, you can create a new version of the project without breaking anything that already worked. This alone helps speed up the delivery of new software updates.
If conflicts between two versions arise, when two developers work on the same file at the same time for example, the versioning tool gives us an interface to operate changes at a more granular level.
A software project doesn’t live on some developer’s computer. Instead, it’s stored using versioning. Even if a developer gets his laptop stolen, he can still recover all the source code from the centralized versioned repository.
Over the last years, version control systems like Git or SVN have become an essential part of software development, sometimes assimilated to the process of automating the release of new software changes also known as CI/CD (Continuous Improvement / Continuous Delivery). You can’t work at a professional level without it, so it’s important for you to leverage this kind of tool early on when you’re learning how to code.