DEV Community

Cover image for What is version control? - 14 days of Git
Sarah Lean 🏴󠁧󠁢
Sarah Lean 🏴󠁧󠁢

Posted on • Originally published at techielass.com

What is version control? - 14 days of Git

This is the first part of my 14 days of Git learning journey.

I've often heard the terms version control, and source control.

I've heard them used together and separately.

But is there a difference or are they same term?

What is version control?

Version control keeps a track of every modification to code in a kind of database.

If a mistake is made, you can turn back the clock, compare it to earlier versions and help to fix the mistake, while minimising disruption to others that are working on that code.

The code that you could be tracking could be software source code or it could be infrastructure code. It can be any type of code.

Version control isn't just for software developers.

Why version control?

For most projects where code is used, whether it be application code or the code you use to deploy your infrastructure resources. It is the jewel in the crown.

The code is a precious asset that must be protected.

The code repository holds knowledge and history of working through the project. It holds the key to problems encountered and the solutions. It counts towards a lot of time and effort.

Version control protects that code from catastrophic and casual error.

It's very easy for a simple mistake to be made. Saving over the wrong file. We've all been there. We've all done it.

When we are working on documents such as Word or Excel, OneDrive history has saved us. Helped us restore an older version we accidently saved over.

Version control can do that same task for code.

Multiple people can be working on the code at any one time.

It's not uncommon for a team of people to be working on the same code. One engineer could be adding a new feature to the code while another is trying to solve a bug.

Version control allows you to track the changes by individuals.

You can also create what is known as branches, from the main code. Allowing each team member to work on their task separately and then when they are ready they can merge their changes back to the main code.

The branches allow people to work without being blocked by others. And being able to merge the code back to the main code allows checks to be put in place to ensure there are no code conflicts that could cause issues.

Is version control the same as source control?

The terms version control and source control as used interchangeably.

They mean the same thing.

Can you code without version control?

It is possible to continue to work on your software or infrastructure as code project without any version control, but doing so can put a massive risk on the team's efforts and work.

The question really shouldn't be whether you use version control or not, but more around which version control system or tool you should be using.

14 days of Git

There are a lot of different version control systems, in our next learning exercise as part of 14 days of Git. We will be exploring Git and how it can be used in version control.

You can follow along here: https://github.com/weeyin83/14daysofgit

Top comments (0)