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