Installing Git

To begin contributing to GitLab projects, you must install the appropriate Git client on your computer. Information about installing Git is also available at the official Git website.

Supported operating systems

Git is available for the following operating systems:


A version of Git is supplied by macOS. You can use this version, or install the latest version of Git on macOS by downloading it from the project website. We recommend installing Git with Homebrew. With Homebrew, you can access an extensive selection of libraries and applications, with their dependencies managed for you.


  • 15 GB of available disk space for Homebrew and Xcode.
  • Extra disk space for any additional development libraries.

To install Git on macOS:

  1. Open a terminal and install the XCode Command Line Tools:

    xcode-select --install

    Alternatively, you can install the entire XCode package through the macOS App Store.

  2. Select Install to download and install XCode Command Line Tools.
  3. Install Homebrew according to the official Homebrew installation instructions.
  4. Install Git by running brew install git from your terminal.
  5. In a terminal, verify that Git works on your computer:

    git --version

macOS update

Periodically you may need to update the version of Git installed by Homebrew. To do so, open a terminal and run these commands:

brew update
brew upgrade git

To verify you are on the updated version, run git --version to display your current version of Git.

Ubuntu Linux

On Ubuntu and other Linux operating systems, use the built-in package manager to install Git:

  1. Open a terminal and run these commands to install the latest Git from the officially maintained package archives:

    sudo apt-add-repository ppa:git-core/ppa
    sudo apt-get update
    sudo apt-get install git
  2. To verify that Git works on your computer, run:

    git --version

Ubuntu Linux Update

Periodically it may be necessary to update Git installed. To do so, run the same commands.


Go to the Git website, and then download and install Git for Windows.

After you install Git

After you successfully install Git on your computer, read about adding an SSH key to GitLab.