debian-mirror-gitlab/doc/topics/git/how_to_install_git/index.md
2021-09-30 23:02:18 +05:30

3.5 KiB

stage group info description type
Create Source Code To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments This article describes how to install Git on macOS, Ubuntu Linux and Windows. howto

Installing Git (FREE)

To begin contributing to GitLab projects, you must install the Git client on your computer.

This article shows you how to install Git on macOS, Ubuntu Linux and Windows.

Information on installing Git is also available at the official Git website.

Install Git on macOS using the Homebrew package manager

Although you can use the version of Git shipped with macOS or install the latest version of Git on macOS by downloading it from the project website, we recommend installing Git with Homebrew to get access to an extensive selection of dependency-managed libraries and applications.

If you don't need access to any additional development libraries or don't have approximately 15 GB of available disk space for Xcode and Homebrew, use one of the previously mentioned methods.

Installing Xcode

To build dependencies, Homebrew needs the XCode Command Line Tools. Install it by running in your terminal:

xcode-select --install

Click Install to download and install it. Alternatively, you can install the entire XCode package through the macOS App Store.

Installing Homebrew

With Xcode installed, browse to the Homebrew website for the official Homebrew installation instructions.

Installing Git via Homebrew

With Homebrew installed, you are now ready to install Git. Open a terminal and enter the following command:

brew install git

Congratulations! You should now have Git installed via Homebrew.

To verify that Git works on your system, run:

git --version

Next, read our article on adding an SSH key to GitLab.

Install Git on Ubuntu Linux

On Ubuntu and other Linux operating systems it is recommended to use the built-in package manager to install Git.

Open a terminal and enter the following commands to install the latest Git from the official Git maintained package archives:

sudo apt-add-repository ppa:git-core/ppa
sudo apt-get update
sudo apt-get install git

Congratulations! You should now have Git installed via the Ubuntu package manager.

To verify that Git works on your system, run:

git --version

Next, read our article on adding an SSH key to GitLab.

Installing Git on Windows from the Git website

Open the Git website and download and install Git for Windows.

Next, read our article on adding an SSH key to GitLab.