How to upload your own source code on the GitHub

Source: Internet
Author: User

NO1. CD to the root of your project, then execute git command, create warehouse

Git init

NO2. Add all files in the project to the warehouse

git Add.

Or

git add--all

NO3. Submit the Add file to the warehouse

Git commit

Enter your submission comment (hold I start input, ESC complete input,: Wq exit Input)

Then you will be prompted to enter GitHub's account number and password.

NO4. Create your own warehouse on the GitHub


Once created, it will have its own warehouse, copy the warehouse address


No.5 the local warehouse to its own github

Git remote add origin your warehouse address

No.6 pull

Git pull Origin Master

An error occurred

Fatal:refusing to merge unrelated histories

Perform

Git pull Origin master--allow-unrelated-histories




No.7 upload code to GitHub remote warehouse

Git push-u Origin Master

Then, code upload successful


Finally, I enclose my first work: Https://github.com/SexiZhang/PJSIP




Related Article

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.