Git Installation (Mac)

there are many ways to install git on a mac and you may already have it installed. If you are not sure, open a terminal, type git --version, and press enter. If you get a version number, you are good to go. If not, follow one the installation paths below.



GitHub Desktop (easiest)

GitHub Desktop is a GUI for git that makes it easy to manage your git repositories. It will install git for you if it is not already installed.

  1. Go to desktop.github.com
  2. Click the Download for macOS button
  3. Open the downloaded file
  4. move the GitHub Desktop icon to the Applications folder
  5. open GitHub Desktop from your Applications folder
  6. Click Sign in if you already have a GitHub account, or click Create account to create one
  7. You're all set!



Homebrew

Homebrew is a package manager for macOS. It allows you to install and manage software packages from the command line.

  1. check if homebrew is installed by opening a terminal, typing brew --version, and pressing enter. If you get a version number, skip to step 4.
  2. Open a terminal and paste the following command:
    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
    
  3. Press enter and follow the prompts to install homebrew
  4. Open a terminal and paste the following command:
    brew install git
    


Xcode

Xcode is a development environment for macOS that comes with git installed. It is available for free from the Mac App Store. It is a large download and will take a while to install so only use this method if you plan to use Xcode for development.


  1. Go to Xcode in the App Store
  2. Click the Get button
  3. Click the Install button
  4. Follow the prompts to install Xcode
  5. Open Xcode
  6. Restart your computer
  7. check that git is installed by opening a terminal, typing git --version, and pressing enter