Use of Git in iOS and iOSGit

Source: Internet
Author: User

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.

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.