Preamble

Version Control System, or VCS, allows you to save a snapshot of your project anytime you want. It's like making a copy of your project for backup and safekeeping, except that VCS typically does this more efficiently. It also comes with facilities to restore to an earlier copy (version).

Git

Git is the world's most popular VCS. It can keep a complete history of the changes made to code and revert to old versions when needed. This feature comes in handy when you want to make changes to code without losing the original.

Git also facilitates synchronizing code between different people, making collaboration in a team easier. This feature leads to increase productivity, in particular in a large software project that involves many developers.

Every time you save a new version of your project, Git requires you to provide a short description of what was changed. This process helps to understand how the project evolved between versions.

I use Git for all my coding projects, even when it is small, and I am the only one working on it. I do this because the history of changes helps me understand what happened when I visit the project later.

Install Git

Follow the instructions provided here to set up Git on your computer.

Checking if Git is installed

Open terminal in Linux or macOS, or "Git Bash" on Windows. Then run the following command:

git --version

Configuring Git

Tell Git who you are

git config --global user.email "you@example.com" 
git config --global user.name "Your Name"

GitHub

GitHub is a website that stores Git repositories on the internet to facilitate the collaboration that Git allows for. We will be using GitHub in this class. If you don't already have an account, please make one by visiting github.com/

Terminal

The terminal or command-line is an interface that processes commands in the form of lines of text. I assume that you know the very basics of working with the terminal. If not, please review this short introduction that prepares you for the following steps.

You need to be able to open the terminal in your code editor. Please refer to this documentation if you are using VSCode.