First step: Build a git repository
CD to your local project root directory, execute the git command
git init
Step Two: Add all the files of the project to the warehouse
add .
If you want to add a specific file, simply change it to a specific filename.
Step three: Commit the Add file to the repository
commit -m "注释语句"
Fourth step: To create your own repository on GitHub, create the page as shown:
Click on the Create repository below, you will go to a page similar to the one below, get the HTTPS address of the warehouse created, the red box is marked
Fifth step: Focus on the local warehouse to GitHub
add origin https://github.com/hanhailong/CustomRatingBar
The following HTTPS link address is replaced by your own warehouse URL address, which is the red box above the winning address
Sixth step: Before uploading GitHub, pull it first and execute the following command:
git pull origin master
After hitting enter, the output will be executed similar to the following
Seventh step, the last step, upload the code to GitHub remote repository
push -u origin master
After execution, if there is no exception, wait for the completion of the upload successfully, the middle may let you enter username and password, you just enter GitHub's account and password on the line
Finally, attach the code after the successful upload:
Uploading local code to GitHub