Uploading native code to github using Git

Source: Internet
Author: User
Tags using git

#1注册GitHub账号) to https://github.com/to sign up for GitHub account # # # on GitHub to build a github warehouse * *) log in and click on the "New Repository" button in the bottom right to create a new warehouse * 2) After filling out the warehouse information, click "creat Repository" button to create the warehouse (warehouse name is optional) note Do not tick initialize this repository with a readme#3 download and install GIT version management tool *) to HTTP ://git-scm.com/downloads Download and install git version management tool # # # Configure GIT versioning Tools * * Configure user name and user mail Open command line or git Bash, enter the following command: Git config--global User.Name "YourName" git config--global user.email "youemailaddress" if "--global" is omitted, only the current warehouse user information is configured to authenticate with SSH key * * Generate SSH key, use SSH authentication login to open git bash (right click on Desktop menu under Windows Git Bash option/mac directly using terminal), enter the following command: Ssh-keygen-c "youemailaddress"-t RSA then directly press ENTER to use the default path to save the key file to the current user folder in the key file as (. ssh), then set the password and re-enter the password * *) Add the SSH key to GitHub to the directory to find the. SSH folder (Id_rsa is the private key file, Id_ Rsa.pub for a public key file) use your notebook to open the Id_rsa.pub file and copy the contents of the file to GitHub click on the account settings in the upper right corner and select SSH keys in the left column to add Shh key to paste the content you just copied into the Key text box, Title text box feel free to fill in the # Create a local warehouse and upload the code to github*1 the new text folder as the repository root (the folder name is arbitrarily named) * *) will need to upload the code file to the text root directory to create a repository in the root directory using the command line or git Bash , enter the following command: Go to the text root and enter GIT init (initialize a warehouse) to add all the files to the warehouse using the command line or Git bash, enter the following command: Git Add. Submit using the command line or Git bash, enter the following command: Git Commit-m"Commitinfo" *6) Add source to Githubgit remote add origin [email protected]:yourname/yourrepositroy.git*7) upload source to Githubgit Push-u Origin Master

Uploading native code to github 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.