1.
The easiest place to install git on a MAC platform is to use the graphical git installer, which:
http://sourceforge.net/projects/git-osx-installer/
The installation interface is as follows:
I installed git2.10.0, which is the latest version.
2. Open the installation package and you can see that the interface at this time is:
We need to install the. Pkg installation package into the system. After I double-clicked the installation package, the results failed to install successfully. The interface is (this figure is different from git version only):
Here is a hole, although it is very simple problem, but for beginners sometimes headache. Later, on the internet finally found the reason, because this requires permission, so the direct click on the installation is not successful. By holding down the control key (only the version is different), click the pkg file. This will bring up the installer interface. As shown in. Then select open to complete the installation .
3. Open the terminal, use Git--version or which git command to view the installation version, there is a successful installation
4. Open the terminal after successful installation
cd ~ Enter the root directory input command Ssh-keygen generate Ssh-key, if prompted, always press ENTER 5. Add SSH key to GitHub. Log on to the GitHub page, account settings->ssh public keys->add Another key to copy the generated key (id_rsa.pub file) contents to the input box, save. Commd+shift+g Enter/users/chen/.ssh/can see the private key and public key is the name of the private key is Id_rsa, is the server to determine your identity of the unique credentials. The name of the public key is id_rsa.pub. Send this file to the warehouse administrator, who will place the public key on the server and git will interact with the server through the private key above. If you use GitHub, you add the public key content 6. Find a directory to execute git clone http://xxx.git (from the server side to clone the Git library, of course, the server administrator to give you permissions and account), after the xxx directory is a git directory, you can perform git operation in this directory. (Clone's project is located under/users/chen/) Reference link: http://www.cnblogs.com/chenlogin/p/5124318.html
Mac OS git installation