This blog for not git children's shoes, the great God can bypass, the wrong place thank you;
About GitHub Strong here is not the explanation, know GitHub also have some time, but have been suffering from not use.
This article describes how to host the project code to the above; If you have not registered GitHub account please go to https://github.com/to register
If you have registered your GitHub account, you have installed GitHub on your computer and have not uploaded the code.
1. Open the browser login to your GitHub account, creat a new repo as shown:
2. Then jump to the next page, fill in Repository name, such as: TEST, in Add. Gitgore a choice according to the language you use, the other default, and then creat repository
Then GitHub automatically generates a simple command line for you to host your project, HTTP, SSH, and the remote warehouse address you created for your connection.
3. Open Xcode to create a project, such as the project name I created Testdemo, then open the terminal, enter the Testdemo folder, and enter the creat a new repository on the command line prompt
Project code has been managed;
When you enter GIT push-u Origin master on the terminal, you will come out username: and password This represents your GitHub account and password, we enter the account and password has been shown as blank, which is to prevent user privacy disclosure without displaying any information, It's not computer-computer animation.
4. Then in the repositories of your GitHub account you will find the Testdemo code project you just replaced on the terminal: Figure
Opening test,https://github.com/xfzldxf/test.git is a link to the code engineering that allows you to clone the contents of the project to local
Explain the command entered below:
1 Touch readme.md file is the introduction of engineering code, similar to the use of manual
2 git init Initializes a local git repository and generates a hidden. Git directory (the hidden. Git directory can be viewed using the LS-AF command)
3 git add readme.md the readme.md file to the warehouse
4 git commit-m "one commit" execution submission instructions, in Gitz this is mandatory
5 git Remote Add origin https://github.com/XFZLDXF/TEST.git add local warehouse origin and specify the address
6 Git push Origin master pushes the local warehouse to the remote designated Master branch