GitHub Upload Code Rookie Super Detailed tutorial "Go"

Source: Internet
Author: User
Tags git shell

Recently, you need to upload your lesson code to GitHub, just to fork someone else's code.

This article is written using the method under Windows.

First step: Create a new GitHub account

Step Two: Create a new warehouse

Part III: Fill in the name, Introduction (optional), tick initialize this repository with a readme option, which is automatically created Reamde.md file, save you to create again.

Fourth step: Install GitHub Shell program, address: http://windows.github.com/

Fifth step: Open the Git Shell and enter the following command to generate the key to verify the identity

Ssh-keygen-c ' [email protected] '-t RSA

After three consecutive returns, the. SSH folder is generated under the Windows current User directory, just like Linux.

Copy all the contents of the Id_rsa.pub file under the folder.

Then open the GitHub account settings,

Open SSH keys


upper right corner click on Add SSH key

Then in the title casually input, key bar paste just the key.

Sixth step: Enter the command under GIT shell to test if the public key is properly authenticated.

ssh-t [email protected]

The correct results are displayed:

warning:permanently added ' github.com,207.97.227.239 ' (RSA) to the list of known hosts. Hi flowerowl! You've successfully authenticated, but GitHub does not provide shell access.

Warning don't bother.

Seventh Step: Clone the newly created repository to local, enter the command:

git clone https://github.com/Flowerowl/stumansys.git

This will be generated under the directory:

Eighth step: Copy the code directory you want to upload to this folder:

Nineth Step: Switch to the git shell command line and enter the command:

git initgit commit-m ' stumansys ' git remote Add Origin Https://github.com/Flowerowl/stumansys.gitgit push Origin master

If you execute git remote add origin

Https://github.com/Flowerowl/stumansys.git

, an error occurred:

Fatal:remote origin already exists

The following statement is executed:

Git remote RM origin

Then execute git remote add origin https://github.com/Flowerowl/stumansys.git .

When executing GIT push Origin master, an error occurred:

error:failed to-push som refs to ....

The following statement is executed:

Git pull Origin Master

First, the remote server github above the file pulled first, and then push up.

Finally, you can go to the project page to see ~ ~ Code Upload Success!

There are questions can be in the bottom of the message, we solve together ~

Reprint Please specify: Kat in? GitHub Upload Code rookie Super Detailed tutorial

GitHub Upload Code Rookie Super Detailed tutorial "Go"

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.