Mac
Download the Git installer from Git official website.

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.)

Install Homebrew
Open a terminal window.
In the terminal window, paste this command
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh"and press enter.
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.
Press "Return/Enter" when you see the message "Press RETURN/ENTER to continue or any other key to abort:"

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

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