How to use git tools to submit code to GitHub

Source: Internet
Author: User
Tags how to use git

Is broadly divided into the following steps

    • Install the GIT environment, tools using Msysgit
    • The account number on GitHub

First click on GitHub on the plus sign next to add new, choose New Repository, create a name for yourself, assuming named hevily

The online github is over.

Start setting up local mysysgit associated with online, first the pub file of SSH is associated with SSH key on line

Note that the C in here is uppercase Ssh-keygen-t rsa-c "your Gtihub mailbox"

After setting, go to the command prompt directory, default to C:\USERS\ADMINISTRATOR\.SSH here only need. pub file another is the private key, their own, id_rsa.pub this file is the public key, open with Notepad, note the encoding format, If it is garbled to indicate that your open tool has a problem, open after CTRL + a CTRL + C copy all content

Status go to GitHub on the line, click on the settings to find SSH keys, click on the Add SSH key, title himself casually write, paste the content just copied to the key text box inside, save! Done!

Current situation open mysysgit This tool, need to first global configuration under your mailbox and name, command as follows

git config--global user.email "GitHub mailbox" git config--global user.name "GitHub name"

After this configuration, your oh your work has basically completed a large part of the

Start and remote, which is the library hevily on GitHub , to associate

= = = Ad git GitHub= = =

First in your own local folder, here we operate under the D:\git-test

cd/d/git-test/

First you need to clone the library on the line

The back of [email protected]:hevily/hevily  is the git address you created the project just now//if you can't find it, go to the online click on the hevily you created, right, see right  //sh clone URL/ /you can clone with HTTPS, SSH, or subversion.//this place, click SSH and copy the address inside the box, you can git clone [email protected]:hevily/hevily

Enter the hevily clone good directory and start creating your own ideas with impunity.

Start submitting.

First of all, link to the remote git repository, git remote add origin [email protected]:hevily/hevily//start adding all the local files to git Add.//Commit git commit-m " Here's what I wrote. Commit comments "//submit to remote Git push-u origin master

Go to GitHub on the line to see if your files have been submitted successfully.

How to use git tools to submit 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.