Create a GitHub remote repository

Source: Internet
Author: User

How to create a GitHub remote repository

First of all, you have to go to the GitHub website to register your account https://github.com

Then create a project that creates a new repository

After you fill in the repository name with the Zxtabbarcontroller (your remote repository name), the others remain the default settings,

By clicking the "Create Repository" button, you have successfully created a new git repository:

Open terminal to enter your file directory

Ssh-keygen " [email protected] "

Instead, you will be asked to confirm the path and enter the password after you have registered on GitHub, we use the default one-way carriage return.

Successful words will be generated under the ~/. SSH folder,

Go in, open the Id_rsa.pub, copy the key inside.

VI /users/jackey/. SSH

Copy all of the contents and then go back to the GitHub page to select setting

Select SSH and GPG keys after entering settings

Select New SSH Key

After entering title and key, select the Add SSH Key button to complete the add

Now go back to the terminal and test if you can connect to the GitHub server

ssh -t [email protected]

See this tip to show that it's set up.

ssh -T [email protected]hi zhouxihi! You'vesuccessfully authenticated, but GitHub does not provide shell access.

You can then push the local file to the remote repository.

Initialize the local repository first

Git init

Add File

git Add.

Write Cache

' First upload '

Add a remote repository

git remote add origin [email protected]:zhouxihi/zxtabbarcontroller.git

Push files to remote repositories

Git push-u Origin Master

Display 100%. Yes, that's it.

Bogon:zxtabbarcontroller jackey$ git push-u Origin mastercounting objects: $, Done. Delta compression using up to4threads.compressing objects: -% (Wuyi/Wuyi), Done. Writing objects: -% ( $/ $),86.20KiB |0BYTES/S, Done. Total $(Delta -), reused0(Delta0) remote:resolving Deltas: -% ( -/ -), Done. to [email Protected]:zhouxihi/Zxtabbarcontroller.git* [New branch] Master,Masterbranch Master set up to track remote branch master from Origin.

Each time you have to modify the local file, as long as the following three steps can be pushed to the server

->git Add.

->git commit-m ' second upload '

->git Push-u Origin Master

If you want to pull down from the server, you can use the command

git clone https://github.com/zhouxihi/zxtabbarcontroller.git

Create a GitHub remote repository

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.