1. First you need to register a github account and then you need to download and install Git. Download on the official website is OK, after the download is finished right click on the desktop will appear the following two icons. Click on the git Bash below and a window similar to the console appears.
2. Open the project folder
3. Enter Git init, then you will find a git file in the folder, which means to generate local git management in the current folder
4. Enter git Add. (Note that there is a point in the back), add all the files in the folder inside the warehouse, if only add one, the. (dot) to the file name is OK
5. Enter Git commit-m "first commit", double quotation marks are comments, can change according to the situation
6. Open the GitHub website, log in to your account, create a warehouse, click on the + sign location, then click the button labeled Yellow
7. Enter the warehouse name and warehouse description, click the CREATERSP button
8. Copy this link labeled Yellow
9. Go back to the console and enter the GIT remote add origin "just copied address", which associates the local repository to GitHub.
10. Enter Git push-u Origin master, which uploads its code to GitHub, and seconds later
Pop up a box that lets you enter a user name and password, and the input is OK.
How do I upload a local project to GitHub?