First step: Create your own repository on GitHub
Step two: Create a local repository CD to your local project root directory and execute the git command
1:$ CD to your project directory
2:$ git init
Step three: Add all the files from the local project workspace to the staging area
3:$ git Add.
Step three: Submit the file of the staging area to the local warehouse
4:$ git commit-m "comments"
Fifth step: Associating a local warehouse to GitHub
5:$ git remote add origin https://github.com/zhibinhsu/ShowAllLabel.git use your own URL ( the address of the warehouse you created to assign the address in the address bar)
This step if prompted error: Fatal:remote origin already exists. The solution is as follows:
1. First delete the remote git repository $ git Remote RM origin
2. Re-add the remote git repository $ git Remotes add Origin https://github.com/zhibinhsu/ShowAllLabel.git use your own URL (the address of the warehouse you created to assign the address in the address bar)
Sync to Server
6:$ git push-f Origin Master
Upload a local project to GitHub and submit the code using the terminal command line