1. See if Git is currently installed
which -a git/usr/bin/git
$ git--2.3. 2 (Apple git-)
The current Mac has its own 2.3.2 git
2, if not installed, or the installed version does not meet the version you need, go to http://git-scm.com/downloads download, and then install
ls /usr/local/git/bin/git git-cvsserver git-shell git-upload-packgit- Credential-osxkeychain git-receive-pack git-upload-archive gitk
Enter ls/usr/local/git/bin/, if the path exists, the installation succeeds
3. Git before installing or replacing it for the first time
1 VI . Bash_profile 2 $ git--version32.3. 2 (Apple git-)4
Note : The first line VI bash_profile, you need to add a file path in the file to the export Path=/usr/local/git/bin: $PATH
4. View current Git
Tonypc:.git green$ git--2.4. 3 which -/usr/local/git/bin//usr/bin/git
The git version was successfully updated by the original 2.3.2 to 2.4.3
Git mac Installation