Uploading files to git

Source: Internet
Author: User

1) Configure user name and user mail
Open the command line or Gitbash, and 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

2) Generate SSH key, use SSH authentication login
Open Gitbash (Under Window Right-click on the Desktop menu git bash options/mac directly using the terminal), enter the following command:
Ssh-keygen-c "youemailaddress"-t RSA

3) Add SSH key to GitHub
To the directory, locate the. SSH folder (Id_rsa is the private key file, Id_rsa.pub is the public key file)

4) Build the repository in the root directory
Using the command line or Gitbash, enter the following command: Go to the text root and enter GIT init (initialize a repository)

5) Add all files to the warehouse
Using the command line or Gitbash, enter the following command: Git Add.

6) Submit
Using the command line or Gitbash, enter the following command: Gitcommit-m "Commitinfo"

7) Add source to GitHub
git remote add origin[email protected]:yourname/yourrepositroy.git

8) Upload Source to GitHub
Git push-u Origin Master
If the local file is not readme.md
Need to gitpull-rebase Origin master to synchronize first

Web Front end Learning Communication Group 21 598399936

QQ Registration Login http://www.kgc.cn/index.php?tuin=7123 receive learning materials and new rewards

Uploading files to 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.