How do I upload a local project to GitHub?

Source: Internet
Author: User

1. First you need to register a github account and then you need to download and install Git. Download on the official website is OK, after the download is finished right click on the desktop will appear the following two icons. Click on the git Bash below and a window similar to the console appears.

2. Open the project folder

3. Enter Git init, then you will find a git file in the folder, which means to generate local git management in the current folder

4. Enter git Add. (Note that there is a point in the back), add all the files in the folder inside the warehouse, if only add one, the. (dot) to the file name is OK

5. Enter Git commit-m "first commit", double quotation marks are comments, can change according to the situation

6. Open the GitHub website, log in to your account, create a warehouse, click on the + sign location, then click the button labeled Yellow

7. Enter the warehouse name and warehouse description, click the CREATERSP button

8. Copy this link labeled Yellow

9. Go back to the console and enter the GIT remote add origin "just copied address", which associates the local repository to GitHub.

10. Enter Git push-u Origin master, which uploads its code to GitHub, and seconds later

Pop up a box that lets you enter a user name and password, and the input is OK.

How do I upload a local project to GitHub?

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.