1. Use your existing GitHub account to create a project on it. After entering the GitHub website, in the lower right corner, there is a green button called New Repository, click to create a GitHub project.
2, then is to fill in some relevant information. Just fill in your own thoughts.
3. Create SSH Key
Under Shell, enter the following command.
Ssh-keygen-c ' your@email.address '-t RSA
Confirm that you use the default path, and then enter the password twice if you use it (usually directly knock a few returns without using a password)
4. Submit Secret Key
Now go back to the GitHub page and find account Settings in the toolbar on the top right. On this page there is an SSH keys tab, select Add SSH key. The title is literally taken, key is the beginning of the creation of a thing. Locate the Id_rsa.pub file (typically in the user's home directory), open it to see a bunch of text, copy it and paste it into the space on the GitHub page key. Then apply, just fine.
You can test the connection using the following command
Ssh-v git@github.com
5. Upload Code
The last thing to do is upload your code ~ Bash switches to your project directory and enter the following command.
Git remote add origin git@github.com: Your github user name/your github project name. Git
git push origin master
Now go to http://github.com/your GitHub user name/your github project to see your project ~ Good luck
Of course this is from scratch, if you have a git repo that you want to add to GitHub, then just use the 8th Step command (don't forget the key work). So many beginners should be like me, in the initial confusion git and github relationship, Git is and cvs,svn side of a concept, and GitHub is and Google Code, sourceforge a parallel concept, in specific point, Git is a code-management tool, and GitHub is a code-hosting platform, so that's clear. So, git's learning words, see here.
Reference: Git/github The use of the method of small notes