Upload code to GitHub repository using git

Source: Internet
Author: User
Tags using git

Preparatory work:

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

 This repository with a README: Add a Readme.mdgitignore: A repository type that does not need to be versioned, corresponding to the makefile. Gitignorelicense: Certificate type, corresponding build file license 

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

5. 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 bash here, into the following interface, Test_ Bluetooth is the name of my project.

6. 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 (Https://github.com/CKTim/BlueTooth.git replaced with the address you copied earlier)

7. After this step 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 new one out of the folder), the rest are copied to the new and more out of the folder ,

8. Then continue to enter the command CD test, go to the test folder

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 )

Upload code to GitHub repository using git

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.