Skip to main content


AndyBinOriginalAbout 1 min


Git is a full platform software. Please select the corresponding system when downloading and installing.

Install git on Windows

Go to the official website to download the corresponding client: in new window

After the download is completed, you can install it by default (by default, git will be added to the system environment variable).

Install git on Mac

If you are using MacOS for development, there are two ways to install Git.

The first method is to install homebrew and then install Git through homebrew. Please refer to the homebrew documentation for specific methods: in new window

The second method is simpler and recommended. You can directly install Xcode from AppStore. Xcode integrates Git, but it is not installed by default. You need to run Xcode, select the menu Xcode ->Preferences, find Downloads in the pop-up window, select Command Line Tools, and click `Install to complete the installation.

Install git on linux

First, try to enter git in the terminal to check whether it has been installed. If the following content appears, it means that git has not been installed

$ git
The program 'git' is currently not installed. You can install it by typing:
sudo apt-get install git

Ubuntu usage

sudo apt-get install git

CentOS usage:

sudo yum install git -y

Other versions of Linux require source code compilation and installation.
Go to the official website to download the latest version of the compressed package: in new window
After decompression, execute the following command:

git clone
sudo make install


After installing git, you need to configure it before it can be used normally. Open the git bash and execute:

git config --global "Your Name"
git config --global ""

The name and email in the above command are the name and email used when you register GitHub


Note the --global parameter of the git config command. If you use this parameter, it means that all Git repositories on your machine will use this configuration. Of course, you can also specify different user names and email addresses for a repository.

Last update:
Contributors: rumosky
  • Latest
  • Oldest
  • Hottest