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 know VCS are:
Each one has its own quircks, but as I have experience mostly on git, so I will talk only about it on later posts, but not today.
Today I am going to tell about how I ended up finding about git and what I used before it during my first college years.
There are three main reason 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 unefficienty way to version our game. We use .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 were more than one person working on the project each one working on a part of the code or art and we would make our own changes on the project and then create a new zip, trying our most to keep track of the numbers and letters. Once in a while we would sit down and open many zips and drag and drop files, 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 lead to a very angry session of opening many zip files searching for the "right" code.
The next project we looked around for something better than zips and dropbox/drive and we found about git. Not that I 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 do suggest your use it if you are writing, creating art, or almost everything 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.