How to upload native code to github with git command line

Source: Internet
Author: User

Note: The prerequisites for installation are to configure the relevant environment for git or install Git.exe, which is no longer highlighted here

Upload step: (This article uses the GIT command interface to operate)

(git config--global user.email "you@example.com"
git config--global user.name "Your name") for login

1. Go to the Local project directory, right-click "Git Bash here", bring up the git command line interface, and enter

Git init

2. Upload all files in the directory, or you can "." Change to a specific file name

git Add.

3. Submit the project to GitHub

git commit-m "comment statement"

4. Create a new repository on GitHub



5. Click "Create Repository" to jump to a connection, the following red circle to get to the GitHub address of this project

6. Associating local code to GitHub

GitHub address for Git remote add Origin project


7. Upload the code to GitHub before you need to pull

Git pull Origin Master

8. Upload the code to the remote repository

Git push-u Origin Master

Then enter your account, password, upload to GitHub


Reference article: http://blog.csdn.net/hanhailong726188/article/details/46738929


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.