Right-click on "Git Bash here" in the directory where you want to upload your code;
If SSH is not configured locally, you will need to create an SSH key locally.
$ ssh-keygen - TRSA- C "Your e-mail address"
Go back to the GitHub page, select "SSH and GPG keys" from the list on the left, and click on the "New SSH key" button to generate the local directory
Id_rsa.pub the key value in the copy to the Web page, save;
Test if the GitHub connection is successful, enter ssh-t [email protected] in Gitbash;
After the connection is successful, configure the user name and email address for authentication.
$ git config--global user.name "username"
$ git config--global user.email "Mailbox"
Git init
git Add. (There are spaces between add and dots)
git commit-m "comment on the commit code"
git remote add origin [email protected]: User name/repo name
Git push Origin master//update local project to GitHub project
Upload local code to GitHub