How do I upload code to github?

Source: Internet
Author: User

How do I upload code to github?

First you need a GitHub account, all you have to register first!

https://github.com/

We use git to install the Git tool first, which is given here and installed directly after the download:

https://git-for-windows.github.io/

1. Go to GitHub home page and click New Repository to create an item

2. Fill in the appropriate information and click Create

Repository Name: Warehouse names

Description (optional): Introduction to Warehouse Description

Public, Private: Warehouse permissions (publicly shared, private, or designated collaborators)

Initialize this repository with a README: Add a readme.md

Gitignore: A repository type that does not need to be versioned, corresponding to the makefile. Gitignore

License: Certificate type, corresponding build file license

3. Click Clone or dowload an address will appear, copy this address for backup.

4. Next to the local operation, first right click on your project, if you have previously installed git successfully, the right button will appear two new options for the Git Gui here,git bash here, where we choose git bashhere, into the following interface, Test_bluetooth is the name of my project.

5. Then enter the following code (the key step) to clone the repository above GitHub to a local

git clone Https://github.com/CKTim/BlueTooth.git

Note: Replace the https://github.com/CKTim/BlueTooth.git with the address you copied earlier

6: This step after your local project folder will be more folder, the folder name is your github above the project name, I have a test folder, we put all the files under the Local project folder (in addition to the newly-created folder), The rest is copied to the new, more-out folder,

8. Continue to enter the command CD test and go to the Test folder (be sure to switch to the directory where the. Git is located, otherwise you will get an error!) )

9. Then enter the following code to complete the rest of the operation:

git Add. (Note: Don't forget the back., this action is to add the files under the test folder)

git commit-m "Submit Information" (Note: "Submit information" in exchange for your needs, such as "first commit")

Git push-u Origin Master (Note: This is done to push the local repository to GitHub, this step requires you to enter your account and password)

Reference: http://www.cnblogs.com/cxk1995/p/5800196.html

How do I upload code 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.