1. Register your GitHub account first
2. Create a new warehouse
Figure 1: New warehouse Name
Figure 2: A brief description of the warehouse
Figure 3: The Public Warehouse
Figure 4: A private warehouse
Figure 5: This will allow you to clone the library to your computer immediately
3. Complete the above steps and you will see
4. Open the Terminal configuration warehouse and submit code below
4.1 Enter the command in the terminal: CD to the project file to be submitted
Cd/users/ho/desktop/yfviwepager (This is the path I submitted the picture carousel, Yfviewpager is I write the Picture Carousel source folder)
4.2 Git init
This is initialized to create an empty library in this folder
4.3 git Add.
This is to add all the files in the current folder to the uploaded list (note that there is a space), you can also added specific files git add files you want to add (users/ho/other.txt)
4.4 git commit-m "2016.4.4 15:11"
In double quotes is the description of this submission, which you can write according to your own needs, and this command is best written in this way. Some people only use git commit this is not impossible, but such a command, the system will automatically use a default application to open a file for you to enter the description of double quotation marks, but if the system does not open by default, it can not continue to execute, anyway, is to write the description of double quotes, it is not a few words, It is recommended that you write all the commands directly, and save yourself trouble.
4.5 git remote add Origin https://github.com/XXXX/XXXX.git
Here are two places: 1.origin this is equivalent to an individual name, you can write your own can also be written in the name of the current folder, the following address is your new GitHub library address, you built a few libraries, you go to GitHub to find your built library point in to see the corresponding address. I am using the command to submit a picture Carousel Open Source: Git remote add Yfviwepager https://github.com/HOYF/YFViwepager.git (for reference)
4.6 Git push-u Origin master
commit the code, and remember that Origin is an individual name, and this alias is the first time you have submitted the code to GitHub using the alias you used. I am using the command to submit the picture Carousel Open Source is:git push-u yfviwepager master (for reference)
5. Last return, for example, indicates successful submission
6. At this point, open GitHub login only to create your own warehouse, you can see the submitted code file:
Submit code to GitHub