Official Installation Tutorial: Win, Mac, Linux
First, open your terminal and run git --version . If the version of git is shown, then you can skip this part.
Find the version that suits your system (32-bit or 64-bit), run the installer, and follow the installation process. Just click "Next" all the way through the installation setup, ensuring that the setting on the page for environment variables is the second option.
Turn off SJTU VPN first!
Before you install, you can check whether you have already installed git in your terminal by typing:
$ git If the result is command not found, then you have to install git:
- Install brew (for students in China)
$ /bin/bash -c "$(curl -fsSL https://gitee.com/ineo6/homebrew-install/raw/master/install.sh)" or you may use: https://mirrors.tuna.tsinghua.edu.cn/help/homebrew/
If you are outside China, use the following command instead:
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"- Do an update to test the brew.
$ brew upgrade- Now install git by brew:
$ brew install gitYou may refer to -> https://www.git-scm.com/download/linux
Open your terminal and run git --version . If the version of git is shown, then git is properly installed.
