Introduction to Version Control for beginners

In your day to day life writing software, having a program to manage your source code will save you a lot of pain.

In your day to day life writing software, having a program to manage your source code will save you a lot of pain. In this post, I will write about Git, a powerful version control system for every developer.

Version Control System

There are many version control systems (VCS) out in the wild. But the most popular one is Git. In the Stack Overflow Developer Survey 2018, 87.2 percent of all the respondents used Git as their version control system.

Do not get me wrong, there are other VCS that are not Git, Git is simply the most common and widely adopted system there is. Free BSD uses Apache Subversion for example.

What is Git?

Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. - https://git-scm.com/

Git is a program that helps you to manage your source code. At its minimum, Git provides you with "save points", allowing you to backtrack and compare different "save points" and identify exactly when your code went wrong and why you changed it.

Basic operations include

Staging - You put your newly changed files on a stage and prepare for it to do some operations.

Commit - You "save" your newly staged code. You can choose to write a short description of the change known as a commit message.

Status - You check which files are modified and staged.

Log - You check the history of your code, the description and who changed it.

Check out this interactive tutorial.

GUI Clients?

My first every VCS was Git (unless you count zipping the project and uploading it to dropbox). Even though I was a beginner, I had to use remote features such as push, pull, branching, merge, etc. To a beginner, using all of that features on a CLI could be scary, thus I started off using a Graphical User Interface (GUI) Git client. Some of those that I tried are SourceTree, SmartGit, GitHub Desktop, GitKraken. Each of them caters to a user of different level of competence, exposing a different set of features through the GUI and even cater to different types of workflow.

Links included in this post

Version Control preference on Stack Overflow Survey 2018 https://insights.stackoverflow.com/survey/2018#work-_-version-control

Free BSD website https://www.freebsd.org/

Description of git on their website https://git-scm.com/

Git interactive tutorial by Peter Cottle https://learngitbranching.js.org/

SourceTree https://www.sourcetreeapp.com/

SmartGit https://www.syntevo.com/smartgit/

GitHub Desktop https://desktop.github.com/

GitKraken https://www.gitkraken.com/git-client