If you're using a mainstream desktop Linux - Debian, Ubuntu, Raspbian, Fedora, etc. - then you can probably just use your package manager and be up and running in a few minutes. For example, on most of my machines, I would open a terminal (Gnome Terminal, xterm, LXTerm, etc.) and type:

sudo apt-get update
sudo apt-get install git git-gui gitk

On an RPM-based distribution, I would do:

sudo yum install git git-gui gitk

You can also install from source, but usually that should be unnecessary unless your system is very out of date.

Notice those extra packages, git-gui and gitk? You might as well leave those off if you're running a text-only system (like a Raspberry Pi that you only access over a console cable), but on graphical desktops they're helpful tools for quickly committing work and reviewing history.

This guide was first published on Jul 15, 2015. It was last updated on Jul 15, 2015.

This page (Installing Git on Linux) was last updated on Jul 06, 2015.

Text editor powered by tinymce.