What is Version Control?

A very important concept to understand if you are going to work in a team environment. Also very useful to keep your own code tidy or store it online.

Version control is a system that records changes to a file or set of files over time so that you can recall specific versions later.

From the free "Pro Git" book.

Using a Version Control System

It might seem hard to grasp, but the huge platforms have many teams dedicated to a single project and they're working on it at the same time.

The first step to understand how is to choose one of the available systems. The most popular one is Git. Go ahead and download it right off the front page.

There's also other systems such as CVC, Subversion, Perforce, Mercurial, Bazaar, Darcs and others.

Git vs GitHub

You might have noticed me mention GitHub previously, GitHub is a platform, that uses Git. GitHub is a topic for later, currently let's get going with Git.

Using Git

So setting up is easy as you might have noticed. What you might notice first is that now you have 3 applications when you search for a "Git" application, atleast I do on Windows 10.

  • Git CMD
  • Git Bash
  • Git GUI

These are the various ways to use the software, via the CMD as in Command Line. Bash or GUI, as in General User Interface. We're going to go through these in the following posts, but the important part right now is that there are more ways to interact with software than just pressing buttons on an interface.

In the next post we will go through what is the Command Line and how to use it, and later about the various options are, with more featured filled graphical interfaces, than just the Git GUI.

What is Git?

At this point I would highly recommend looking into the freely available "Git Book" chapter on explaining Git.

It might seem as a lot of information, but you only have to learn it once. Git is a very broadly used version control system, which allows you to do many great things around version control.

You can even time travel.

The book itself goes into many if not all aspects of Git and it's usage. You can get to the rest of the chapters via the breadcrumbs at the top.

In short, Git uses principles of repositories (as in folders), which contain code and all of its version history. By adding this additional layer on any folder on your PC you can store the folder contents in multiple versions.

It has principles of branches, that you can create in the repository, or repo in addition to the "main" branch. Imagine you have a website you're building with someone and you want to create your version of the latest version without changing the original code. You would create a branch of your own, which you can then merge with the main branch again.

Summary

There's a lot to learn about version control, so take it easy. I would suggest just to play around with it until it makes sense. Once you get to time travel through the versions, you will probably already feel somewhat comfortable.