Mac

  1. Download the Git installer from Git official website.

  1. After you click "download for macOS", you will be navigated to a website that provides you several options for installing Git on macOS. (Homebrew is recommended.)

  1. Install Homebrew

    1. Open a terminal window.

    2. In the terminal window, paste this command /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh" and press enter.

    3. The command will prompt you for your password (sudo password). Type it in and press Enter. Note that you won't see the password characters as you type - this is normal.

    4. Press "Return/Enter" when you see the message "Press RETURN/ENTER to continue or any other key to abort:"

    5. Following the next steps; run the two commands in the terminal and then run brew help

  2. You can now use Homebrew to install Git, you can use the command: brew install git

That's it! You've successfully installed Git on your macOS system using Homebrew. You can now use Git for version control in your projects.

Last updated