Pre-installation configuration
If you are using MacOS 10.15 ("Catalina") or later, you will need to give "Full Disk Access" permissions to the Terminal. If you're using an earlier version of MacOS, you can skip this section.
Instructions for Ventura or Sonoma
- Open the System Preferences app
- Select Privacy & Security
- Select Full Disk Access
- Click the toggle next to Terminal to the "on" position. You be asked to enter your password.
Instructions for Catalina, Big Sur, or Monterey
- Open the System Preferences app
- Select Security and Privacy
- Select the Privacy tab
- Click the Padlock icon in lower left-hand corner of the window. Enter your user name and password when prompted.
- In the left-hand box, scroll down until you find Full Disk Access and select it
- If Terminal.app is already listed in the right-hand box, check the box next to it
- If Terminal.app isn't listed in the right-hand box, add it:
- Click the + icon under the right-hand box
- Select the Applications folder. Within Applications, open the Utilities folder and select Terminal.app
- Click the Open button
- Locate Terminal.app in the right-hand box and check the box next to it
- Close System Preferences
Install
Install Git on your Mac using one of the following methods (we list more than one method because sometimes your permissions settings will prevent one of the methods from working).
Method 1
- Open the Terminal application by using the Launchpad or by browsing the Utilities folder found under Applications
- Type
xcode-select --install
and press Enter
- A window will pop up asking if you would like to install Xcode Command Line Tools. Follow the prompts to install them.
Method 2
- Open the Terminal application by using the Launchpad or by browsing the Utilities folder found under Applications
- Type
clang --version
and press Enter
- A window will pop up asking if you would like to install Xcode Command Line Tools. Follow the prompts to install them.
Method 3
- Visit https://developer.apple.com/download/more/ in your web browser
- You will be prompted to log in with an Apple Developer ID (this is different than your Apple ID). Follow the instructions for creating an Apple Developer ID and use it to log into the site.
- Download the latest version of Command Line Tools for XCode and install
Verify
- Open the Terminal application by using the Launchpad or by browsing the Utilities folder found under Applications
- Type
git --version
and press Enter
- You should see a message reporting the version number