One, the installation of Git
First step: Download the resources to install first
Git:https://git-scm.com
To see if the installation was successful: Git version
Step two: Execute command: ssh-keygen-t rsa-c youremailnumber ([email protected]), note the command format here, Shh-keygen is linked together, and then all the way to the Enter
Finally, two files are generated Rd_rsa and rd_rsa.pub
The path to these two files is:/user/user name/.ssh
Step Three: Open rd_rsa.pub
Method One: Just follow the path to find
Method Two: The simplest method is the CD./ssh
Then enter the contents of the VI rd_rsa.pub copy onto GitHub (https://github.com) Settings->ssh and Gpgkeys
Fourth step: Add, then verify that you can connect to the
Input command: SSH [email protected]
When the first input, there will be an error, here need to modify the hosts, add the corresponding IP line
1) Modify the hosts to find the Hosts file method directly on the computer
Open Finder, then shift+command+g
Input path/etc/hosts
This opens after the input is not authorized
2) Enter the command in the Command box: Sudu vi/etc/hosts
And then add the IP and the github.com to it.
Fifth step: Set user name and mailbox
git config--global user.name "username"
git config--global user.email youremail@qq.com
This is where Git is installed.
Here are a few other blogs that refer to the Thank you:
http://www.jianshu.com/p/4b1d58126f5b
Https://www.cnblogs.com/peteremperor/p/6135809.html
https://segmentfault.com/q/1010000004549222/
Second, the use of Git
Introduction to JAVAWEB development environment on MAC----git installation and use