Installing Git (FREE)
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:
macOS
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.
Prerequisites:
- 15 GB of available disk space for Homebrew and Xcode.
- Extra disk space for any additional development libraries.
To install Git on macOS:
-
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.
-
Select Install to download and install XCode Command Line Tools.
-
Install Homebrew according to the official Homebrew installation instructions.
-
Install Git by running
brew install git
from your terminal. -
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:
-
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
-
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.
Windows
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.