Use of Git in iOS and iOSGit
Open the terminal:
Terminal command for viewing Git version: git-version
Input: ssh
Check whether ssh exists.
If yes, back up the existing ssh files or generate the new ssh files to another directory.
If this parameter does not exist, use the default parameter to generate an ssh
The generation process is as follows:
Ssh-keygen-t rsa-C XXXX@163.com (email when registering Github)
Add ssh in github :)
Log on to github and select Account Settings-> SSH Keys to add ssh
Title: Email
Key: Open the generated id_rsa.pub file and copy the content to this point.
Open the terminal, first test your account and github don't: ssh-T git@github.com
If a prompt appears, it indicates that you are connected.
Next, you can upload your code and create your own Repository under github. Create a new Repository:
Repository name: the name of the project to be created.
Description: your Description of the project.
Select Public
Click "Create resposity", as shown in:
Follow the steps above (note that you should switch the directory to the project directory you want to upload)
Touch README. md // create a document for record submission
Git init // initialize the local repository
Git add README. md // add files or folders (multiple times required to add files to Github)
Git commit-m "First commit" // submit it to the repository and write some comments.
Git remote add origin git@github.com: youname @ project name. git // connect to the remote repository and create an alias named: origin.
Git push-u origin master // submit the local warehouse to the master branch at the origin address.