Upload your local code to the GitHub process

Source: Internet
Author: User
Tags git clone repository

1. Register your GitHub account.

2. Create a personal github warehouse,

 or you can enter a personal center to create, you can also directly click "+" in the upper right corner to add,

3, the creation of their own repository,

4, the new completion will enter a page similar to the following, copy the address of the creation warehouse,


5. Open a local git command window or cmd Command window, CD to the root of your project, and execute the command line:

git clone repository address (the address copied from the previous step), for example, I copied the warehouse address I created:


6, open the project folder, you will find that the new file in GitHub has been local,

Copy the file you want to upload to this directory, and after the copy is complete, execute the command git status to see if Git gets the file changes . 

7, then execute the command git add--all, add all the files to the warehouse, if you want to add a file, then replace the following--all with the file name you want to submit.

8, then also need to add the file commit to the repository, execute the command git commmit-m "comment statement",


9, this is not finished, but also to push the commit code to the remote branch, because we have only the master branch locally, so we can directly execute the command git push,

will let you enter your username and password, you can enter your GitHub login username and password.  

At this point, refresh the address of the new warehouse on the page and you'll see that the new files have been successfully uploaded to git:

Upload your local code to the GitHub process

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.