The Git Version Control System

4 min read·Jan 1, 2025

Git is a free and open-source command-line interface version control system available on Linux, macOS, and Windows.

It allows developers to track the changes made to their projects by saving complete snapshots of all the edited files at specific points in time, in the form of a browsable history.

It allows them to experiment with new features without affecting the main codebase and seamlessly integrate those changes once they are finalized.

Last but not least, its distributed model allows multiple developers to work collaboratively on the same project, even if the central server goes offline, and later synchronize their changes when the server is restored.

In short, Git is an essential tool for developers to efficiently manage, share, and maintain codebases in projects of any size.

Installing Git

git is the command-line tool used to manage both local and remote Git repositories.

On Linux using APT

To install Git on Linux, you can use the apt-get command:

$ sudo apt-get update
$ sudo apt-get install git

To verify that the installation was successful, you can print Git's current version using the git --version command:

$ git --version

On macOS using Homebrew

To install Git on macOS, you can use the brew command:

$ brew install git

Note: If you've installed XCode, Git may already be installed on your machine. You can find out using the git --version command.

Configuring Git

Once you've installed Git, you need to configure it.

Configuring your identity

To configure your Git username and email address, which will be used to identify your commits, you can use the git config command:

$ git config --global user.name "John Doe"
$ git config --global user.email "johndoe@example.com"

Configuring your editor

To configure the default text editor that will be used when Git needs you to type in a message, you can use the git config command:

$ git config --global core.editor vim

Note: If not configured, Git will use your system's default editor.

Getting help

If you ever need help while using Git, you can access the manual page of any of the Git commands, either using the git help command:

$ git help <command>

Or the man command:

$ man git-<command>

Enjoying the courses?

I've made these courses completely free so anyone can learn from them. If they've helped you and you'd like to actively support the work behind BackendBrewery, you can leave a tip:

Support BackendBrewery
The Git Version Control System | Backend Brewery