GitHub Uploading files

Source: Internet
Author: User

Before using GitHub to manage their own code, but have been unable to remember the statement, today and use GitHub, or record it!

1. Upload your own code for the first time

Create your own library on GitHub and execute it in the directory of your code:

Git init
Touch readme.md
git add readme.md

Git commit-m ' first_commit ' sometimes makes mistakes when executing this sentence.

When this error occurs, follow the prompts: git config--global user.email "[email protected]" Your git account's mailbox
git config--global user.name "Your name" username for your git account

Git remote add Origin https://github.com/nicky-ji/Turbo.git
Git push Origin Master

2. Update your own code base

This is the method for updating the code base

git Add. (Note that there is a dot behind it.)
Git commit-m ' first_commit '
Git remote add Origin https://github.com/nicky-ji/Turbo.git

Execution may occur when the following appears, execute statement git remote RM origin


Git push origin Master Enter user name and password OK!


Ps:

In fact, when I first approached GitHub, I didn't succeed with the first method above. Instead of cloning the empty code base first,

Execute the git clone https://github.com/nicky-ji/Turbo.git and execute the 2 statement first. Hey, it's also a way to wow


GitHub Uploading files

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.