Xcode has integrated git, hooked up with Git when creating a new project, and then follow the steps below to make Xcode and Git@osc connect.
First step: Genetic SSH key
Open Terminal Command tool, enter command: ssh-keygen-t rsa-c "email address"
Note that there are no spaces for Ssh-keygen. Screen output:
Generating public/private RSA key pair.
Enter file in which to save the key (/USERS/DIAOSI/.SSH/ID_RSA): Document name
Enter the generated key file name above, such as: qinpeikey, screen output:
Enter passphrase (empty for no passphrase): Enter password
Enter same passphrase again: Confirm password
Your identification have been saved in Diaosi.
Your public key had been saved in Diaosi.pub.
The key fingerprint is:
25:fd:01:00:89:98:49:bf:2e:ac:32:2e:d2:5d:bf:98 diaosi@gmail.com
5D:BF:96:2F:51:D7:5F:C4:66:15:9F:80:99:73:1E:DC [email protected]
The key ' s Randomart image is:
+--[RSA 2048]----+
| =.. o+|
| = +. eb|
| =. =o|
| . . o =|
| S. .. +|
| . o.|
| +. |
| ... |
| ..|
+-----------------+
The ScreenTip generates the key file successfully, saved in
Step Two: Add the contents of the qinpeikey.pub to the SSH key of the Git@osc
Step three: Add SSH and connect
Input command: Ssh-add ~/user Name
Enter Passphrase For/users/litingzhe/qinpeikey:
Identity added:/users/litingzhe/qinpeikey (/users/litingzhe/qinpeikey)
Input command SSH-T [email protected], screen output:
Welcome to [email protected], qinpei2010!
Fourth step: Set up your personal information
Enter the command:
git config--global user.name "your name"
git config--global user.email "your email"
Fifth step: Set up the project
Gets the project path on the Git@osc.
Add when you create a new project in Xcode
And then you can go through
To control the version
Note : It should be noted that every time you restart the system, you must first perform the 3rd step of the Ssh-add ~/user name , verify the password
Xcode uses git to manage versions