How to upload your own local projects to GitHub __git

Source: Internet
Author: User

You can upload local projects to your GitHub just by order. The steps are as follows:

1. Log in your GitHub account, as shown in the following illustration:


2. Click New Repository to create a new warehouse to store your project;


3. Also the most important part, with the command to upload the project;

1.cd to the root of the uploaded project, and then initialize the local repository,

Git init

2. Add the current working directory file to index, add management,

git Add. (Remember there's a point oh, and there are spaces between and add)

3. Check the current directory for all files that are not managed by git and files that are managed by git and modified but not yet submitted.

Git status (if a lot of red files appear, you'll need to do 2 again, git Add. Until there's no problem. )

4. Submit the documents and submit the registers documents to the local warehouse.

git commit-m "message" where the message is the memo you submitted to the file. To know what the effect of this submission is ...

5. Associated remote warehouse, where Origin is followed by the alias of the remote repository.

Git remote add Origin https://github.com/bendan321/nihao.git

6.push files.

Git push-u Origin master.


OK, so that completes the local project to the 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.