Version Control System (VCS)

Dec 23, 2019 Last updated: Jul 2, 2021

Let's talk about version control systems (VCS).

What is it? What it does? Which should I use?

A version control system is a software designed to help you maintain your sanity while changing a lot of files and keeping track of who changed what and when. Although it is generally used by software developers it can be used to keep versions of any type of file.

Most of the VCS I've used had a tree like graph structure to store your file changes in steps usually called commits. These commits are a snapshot of your files at that point in time. Each time you make a snapshot your VCS will store it so that you later can reverse to that file state or compare it with some other snapshot.

Although nowadays the most famous VCS is git, it is not the only one.

Commonly known VCSs are:

Each one has its own quirks, but as I have experience mostly with git, I will talk only about it in later posts, but not today.

Today I am going to tell you how I ended up finding out about git and what I used before it during my first college years.

There are three main reasons I use a VCS for every project I have, even some non-code projects.

  • Keep a backup of my files
  • Work on the projects alongside other people
  • Have the ability to test out new things without worrying

While I was developing an HTML5 game during college with some other freshman students, we did not know about VCS and we used a very inefficient way to version our game. We used .zip files, each one sequentially numbered with some letters, random letters I suppose: game-1.zip, game-1b.zip, ... game-75c.zip, etc.

This happened because there was more than one person working on the project, each one working on a part of the code or art. We would make our own changes to the project and then create a new zip, trying our best to keep track of the numbers and letters. Once in a while we would sit down, open many zips, drag and drop files, and copy and paste code in an epic session of merging the versions. It goes without saying that it did not work very well; we ended up losing track of some part of the code or some new image.

And the worst part was when we would playtest the game and someone noticed a bug that either didn't exist in a previous version or was already fixed by someone, which led to a very angry session of opening many zip files searching for the "right" code.

For the next project, we looked around for something better than zips and dropbox/drive, and we found out about git. Not that I had never heard about it before; I just had never spent the time to learn it.

Using git things just worked. Everyone had their own version to work on (branch), each 'change' was stored (commit), and to put it all together we just had to merge it, which was done automatically.

If you are coding something, I strongly suggest you use a version control system, but I also suggest you use it if you are writing, creating art, or doing almost anything that uses files. It is easier if your file is text based, but it won't hurt to keep track of each new version of an image.

Which VCS should you use? If you are in doubt, use git.

Hope you enjoyed, keep learning!