1.1 Installing Git on a Mac
Check your git version
git --version
Check latest release
MacOS comes with Git installed. Leave that version as it is and install your own version using Homebrew.
Check your brew install
brew doctor
Install latest git
brew install git
Then update your PATH to use the Homebrew installed version of git instead of the one that comes with Apple MacOS.
Add this line in your ~/.bashrc file.
export PATH="$(brew --prefix git)/bin:$PATH"
Update the Homebrew intallation of Git
brew upgrade git
Check the version and you should have the latest
git --version