http://blog.csdn.net/hanhailong726188/article/details/46738929
Reprint please indicate the source:
http://blog.csdn.net/hanhailong726188/article/details/46738929
This article is from: "Dragon's Blog"
Before the beginning of the next topic, previously written a blog, ios-step-by-step to teach you a custom rating star Ratingbar, the group of people want the source code, I uploaded to GitHub, there is a need to see, GitHub address custom rating Star Bar
Well, recently someone in the group asked how to upload the newly created local code to GitHub, here is a simple record, I like to use the command line, which is fully implemented in the command line, do not understand the git command can be understood under.
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:
Thank you!
Teach you to upload local code to GitHub