The use of Git in iOS

Source: Internet
Author: User

Open Terminal:

View the git version of the terminal command:git-version

Input: SSH

Check to see if SSH already exists.

If it exists, first make an existing SSH backup, or build the new SSH into a different directory

If not present, SSH is generated directly from the default parameters

The build process is as follows:

SSH-KEYGEN-T rsa-c [email protected] (email when you register for GitHub)

Add SSH to GitHub (shown:)

Login to GitHub, select Account settings->ssh keys to add SSH

Title: Mailbox

Key: Open the Id_rsa.pub file you generated and copy the contents to this point.

Open the terminal, first test your account with GitHub does not have: ssh-t [email protected]

If a hint appears, you are already connected.

Next you can upload your code and build your own repository under GitHub. Create a new repository is as follows:

Repository name: Usually write the name of the project you want to create.

Description: That's your description of the project.

Select public

Click "Create resposity" to appear as:

Follow the steps above (remember to switch the directory to the project directory you want to pass through when typing in the terminal)

Touch README.MD//Create a new document for record submission operations

GIT init//Initialize local repository

git add readme.md//Add files or folders (need to use multiple times to add files on GitHub)

Git commit-m "First commit"//submit to the repository and write some comments.

git remote add origin [email protected]:[email protected] project name. Git//Connect to the remote repository and create an alias named: Origin.

Git push-u origin master//submits something from the local repository to the address that is the origin address, under the master branch.

The use of Git in iOS

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.