# Mac Install Git & Homebrew
###### tags: `mac`, `git`, `homebrew`, `brew`, `MBA`
1. Open Terminal on your Mac.
2. Install Homebrew by running the following command:
```
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
```
This will download and install Homebrew, which is a package manager for macOS.
3. Once Homebrew is installed
* 將Homebrew加入到您的PATH環境變數中,以便您可以在終端機中使用Homebrew命令。您可以運行以下命令來實現這一點:
```bash
(echo; echo 'eval "$(/opt/homebrew/bin/brew shellenv)"') >> /Users/kuihaochang/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
```
請注意,這裡假設您的使用者名稱為"kuihaochang",如果不是,請將上述命令中的使用者名稱替換為您的使用者名稱。
* 然後,您可以運行brew help命令,以開始使用Homebrew。您也可以查看Homebrew的更多文檔,了解如何使用Homebrew。
```
brew help
```
完成上述步驟後,您已經成功地安裝了Homebrew。您可以使用Homebrew安裝其他軟件包,例如Git,Node.js等。
*
4. Then you can use it to install Git by running the following command:
```
brew install git
```
4. After Git is installed, verify the installation by running the following command:
```bash
git --version
```