Step one: Create a git repository
Create a local repository, in fact, it is create a new folder. The easiest way is to create the right mouse button directly on the desktop, create a new folder (test), then go in the folder.
The right mouse button to open the git -> Git Bash Here -> git init. After executing the command to create a .git folder in the directory.
Step two: Add the need to upload to github code to the local repository how to add, first copy and paste the code to be uploaded to a local warehouse, which is the test folder
Enter the command git status, this time will find a few more things, these things that you just copied in the file, shown in red, it is to be added to the local repository of meaning
Step three: Add the All project files to the repository; since to be added
git add + need to add the name of the file or git add --all all to add all of the files,
Then git status again to view the status can be found copied in a file into a green, this time the file has been added to the local repository
Step 4: commit add files to the repository
After the addition, the final submission on the line, git commit -m "modify the description."
-M added later is a description of this operation, your modified code or re-uploaded everything to be a simple explanation, others read on to know how the story. Then git status to view the status again
Step 5: Create your own Repository go on github
Get the warehouse created click Create repository, you can go step by step execution, successfully created https address
Step Six: associating a local warehouse to github
git remote add origin + 'warehouse address'
The seventh step, upload the code to the remote repository github
git pull --rebase origin master <to get GitHub warehouse README.md>
git push -u origin master <using this line of code submit>