Installing Git
To begin contributing to GitLab projects, you must download and install the Git client on your computer.
This page provides information on installing Git on the following operating systems:
- macOS
- Ubuntu Linux
- Microsoft Windows
For information on downloading and installing Git on other operating systems, see the official Git website.
Install and update Git on macOS
Though a version of Git is supplied by macOS, you should install the latest version of Git. A common way to install Git is with Homebrew.
To install the latest version of Git on macOS with Homebrew:
- If you’ve never installed Homebrew before, follow the Homebrew installation instructions.
- In a terminal, install Git by running
brew install git
. -
Verify that Git works on your computer:
git --version
Keep Git up to date by periodically running the following command:
brew update && brew upgrade git
Install and update Git on Ubuntu Linux
Though a version of Git is supplied by Ubuntu, you should install the latest version of Git. The latest version is available using a Personal Package Archive (PPA).
To install the latest version of Git on Ubuntu Linux with a PPA:
-
In a terminal, configure the required PPA, update the list of Ubuntu packages, and install
git
:sudo apt-add-repository ppa:git-core/ppa sudo apt-get update sudo apt-get install git
-
Verify that Git works on your computer:
git --version
Keep Git up to date by periodically running the following command:
sudo apt-get update && sudo apt-get install git
Install Git on Microsoft Windows
For information on downloading and installing Git on Microsoft Windows, see the official Git documentation.
After you install Git
After you successfully install Git on your computer, read about adding an SSH key to GitLab.