Install Git
Install Git (安装Git)
Working with Git starts with installing or updating, if you already have it on your computer. On this page, you will find how to install Git on Windows, Linux and Mac. (使用Git从安装或更新开始,如果您的计算机上已经安装或更新了它。在此页面上,您将了解如何在Windows、Linux和Mac上安装Git。)
How to Install Git on Mac
How to Install Git on Mac (如何在Mac上安装Git)
There are three ways to install Git on Mac OS X: Git for Mac installer, Homebrew and MacPorts.
Mac Installer
This is the simplest way of installing Git on Mac. Here are the steps to follow:
git --version
git version 2.9.2
Homebrew
Install Homebrew on Mac and then follow the steps below to install Git with it:
brew install git
MacPorts
Follow these instructions to install Git with MacPorts:
sudo port selfupdate
How to Install Git on Windows
How to Install Git on Windows (如何在Windows上安装Git)
Find the instructions below to install Git on Windows:
git config --global user.name "BobSmith001"
git config --global user.email "[email protected]"
How to Install Git on Linux
How to Install Git on Linux (如何在Linux上安装Git)
Debian / Ubuntu ( apt-get )
You can find Git packages via APT. Here are the steps to follow:
sudo apt-get update
sudo apt-get install git
Fedora (dnf/yum)
Git packages are available via yum and dnf. (Git包可通过yum和dnf获得。)
sudo dnf install git