Check out this link and install homebrew: https://www.youtube.com/watch?v=c-1tOojFDFM&t=0s
then use command " brew install git"
On most modern macs, it is already installed.
Just open a Terminal and type "git version" to check.
Follow these steps: