What is a version repository?
A mechanism (or software) that can monitor changes in code and store these files for future reference.
Records which developers modified the project, the time it was modified, the content of the code that was actually modified, or even the restoration of a specific modified file or an entire project.
Use version control tools to avoid manually backing up multiple versions, hard to recover previous versions, resolving code conflicts, code management clutter, the modification of code that is difficult to trace, and modification times ...
Common version control tools: CVS, SVN, GIT
What is Git?
is a free and open source Distributed version Control tool that is able to handle any project, large or small, with agility
Is the second great work of Linus.
Open source software maintained with git: Linux Kernel, Android, jQuery ...
Almost all of the best iOS third-party frameworks are made with Git
Git is also suitable for single-player development, and Xcode has integrated the most common git features.
When creating a project, tick the Git feature
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M02/7C/BF/wKiom1bXmiCA2EkTAABWYCRnrVY198.png "title=" screen shot 2016-03-03 a.m. 9.58.02.png "width=" 405 "height=" "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:405px;height:38px; " alt= "Wkiom1bxmica2ektaabwycrnrvy198.png"/>
Add a Name property to VIEWCONTROLLER.M
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/7C/BF/wKiom1bXmjnjzi55AABVof-8VwM779.png "title=" screen shot 2016-03-03 a.m. 9.58.35.png "alt=" Wkiom1bxmjnjzi55aabvof-8vwm779.png "/>
At this point, the M flag appears on the right side of the VIEWCONTROLLER.M in the project list file
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/7C/BE/wKioL1bXmsTSijYSAAA3XpkRLBQ213.png "title=" screen shot 2016-03-03 a.m. 9.58.52.png "alt=" Wkiol1bxmstsijysaaa3xpkrlbq213.png "/>
Menu bar->source Control-Commint, add a commit message, click Commit XX File
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M01/7C/BE/wKioL1bXmtOjTIMOAAA22pRB3oE016.png "title=" screen shot 2016-03-03 a.m. 9.59.08.png "alt=" Wkiol1bxmtojtimoaaa22prb3oe016.png "/>
After commit, the M flag on the right side of viewcontroller.m disappears.
Note: Be sure to fill in the comments
Menu bar->source control-> History, you can view all the submitted changes
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/7C/BE/wKioL1bXmwSzj76RAABZTpZr9Xs865.png "title=" screen shot 2016-03-03 a.m. 9.59.59.png "alt=" Wkiol1bxmwszj76raabztpzr9xs865.png "/>
Click on the right show xx modeifed files to display the code that was modified during this commit
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/7C/BE/wKioL1bXmxjA1Jg7AADn05wF0Y4805.png "title=" screen shot 2016-03-03 a.m. 10.00.17.png "alt=" Wkiol1bxmxja1jg7aadn05wf0y4805.png "/>
Xcode version Settings
Use command xcode-select–p in terminal to view the current Xcode path
If it is not correct, use the command xcode-select–s to set the correct path
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/7C/BE/wKioL1bXmyuDiOVLAADsLRGD79Y877.png "title=" screen shot 2016-03-03 a.m. 10.00.36.png "alt=" Wkiol1bxmyudiovlaadslrgd79y877.png "/>
Personal Information Configuration
Need to configure personal name, e-mail address information
Using commands in the terminal git Config–global
Where the-l parameter is used to display configuration information
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/7C/BE/wKioL1bXm0HB1oihAADqkG66ELA856.png "title=" screen shot 2016-03-03 a.m. 10.00.54.png "alt=" Wkiol1bxm0hb1oihaadqkg66ela856.png "/>
You can also use the-e parameter to enter VI edit mode to edit configuration information.
Add Branch: Source control-> Project master-> New Branch
Switch Branch: Source control-> Project master-> switch to Branch
Merge branch: Source control-> Project master-> merge from Branch
Enter project directory under terminal
Command: GIT init//initialize a git repository
Command: Git Add//Add files from the current directory to the warehouse
Command: Git commit–m "Add Project"//Submit code once
This article is from the "Ammon" blog, make sure to keep this source http://annmeng.blog.51cto.com/3321237/1746994
Use of Git repositories