iOS development--development Combat & Version Control SVN and git usage explained

Source: Internet
Author: User
Tags svn update sourcetree

version control svn and git usage explainedthe actual development of the company, in the celestial use more or SVN, because SVN is centralized, in the celestial work you understand! -----------------svn-----------------One: The most common basic steps---
    • download (full download, first time), download the server's project to local start development
SVN checkout ip-uaerbane=?     -password=? Here you need add Jane: Co
    • Update the warehouse, the server project changes when the need to update to local, in order to avoid errors or conflicts
SVN updataHere's a direct commit. Jane: Up
    • Write the code ......
    • View Status
SVN status Jane: St
    • Add to Warehouse
SVN add Name
    • Submit Project

SVN commit-m "Comments"

Jane: CI

    • Version fallback : Error action, requirements change, view history
SVN updata R version number//view fallback version formally:
      1. SVN update
      2. SVN merge-r version number (now): Version number (front) name
      3. SVN ci-m "Comments"
    • Remove files from
SVN remove name Jane: RM
    • View version number
      1. SVN updata//update all data first
      2. SVN Log//Print all versions
II: Conflict resolution--------Out of data——
    • ->updata
    • ->commit
(Resolve conflict manually: Postpone): SVN resolved name effectively avoids conflicts:
    • Updata-> first. Modify the file
    • Or say hello to a colleague before modifying the file.
Add:When the seat is a new person add the Li Shijin into the company 1. What needs to be done
      • and items?? The manager wants SVN's server address/SVN account and password requirements? Documentation: Current Requirements
      • Take the port? Documentation: Access? Documentation details of the server all the connection port: What is the end of the interface?

2. Download the server's full code to the local

    • SVN checkout server address? user name and password
3. Code conflicts
      • Out of date: expired
      • DF: Show all the different land in the command line
      • E: edit conflict in command line
      • S: Show options to resolve conflicts
      • MC: To overwrite the server code with my Code
      • TC: Use the server's code to overwrite my Code
      • P: Right? than all versions change,? Resolve conflicts manually->SVN resolved Person.h
Note:1> before modifying the public files, it is best to update and then modify the 2> before modifying the public files, you can talk to colleagues? First, do not modify the file, and then let colleagues update after the modificationThree: Graphical interface (UI): Cornerstone/version

Here is a brief introduction to the use of cornerstone and points of attention-- Main interface--
practical Cornerstone Several places to note:
      • 1. View Logs
Find the "Log" option, select and tap.
Check if your current version is up to date, and if it is not the latest version, start with the 2nd step;
If your current version is up-to-date, proceed from step 3rd;
      • 2. Update to the latest version
The current programmer before opening the project, find the "Update to Latest Revision" option, select and click.
Purpose: Keep the current programmer client's project version up-to-date.
      • 3. Edit the Project
      • 4. Before submitting, click "Update to Latest Revision" again to keep the project in the latest version.
      • 5. After updating the latest version, if there are errors, conflicts and other situations, resolve until no errors!
      • 6. Submit the project, find the "Commit changes" option, select and click.
Purpose: To submit the currently edited project to the server.
      • 7. Use of "lock" and "unlock"
When we are editing a file, in order to prevent it from being modified by others, we can keep the file locked until we edit it, and then unlock it when we are ready to commit it.
      • 8. Submit the project, write the detailed notes and the signature.
      • 9. Revert to the previous version and other previous errors, please refer to the documentation later or search online.
Finally, summarize the use steps

1. Item?? Project Manager initialization item?? Project 1>?? The manager of the project downloads the contents of the server to local

    • Remember to choose the correct SVN version number->1.72> entry?? Project Manager to create an item?? To the code? Folder 3> item?? Manager of the project ignored? Some unnecessary? documents
    • Xcode will help us record the file that is currently being edited, and stay on the next time you open it.
    • Xcode will record for us?? Directory open, colleagues do not need to share breakpoint information colleagues do not need to share, all also need to ignore Xcuserdata

2. Make use of Xcode's svn attention point 1>?? If you use a static library in your project, you must use the command line to add a static library to the SVN management 2> item?? Special attention should be paid to the management of the STORYBOARD,SVN in the eyes.

    • If you can make it with xib so as far as possible? with Xib guarantee at the same time only? People are revising storyboard

3. Do you want to use the SVN technique as much as possible to modify the file before you update, write, or post some code? Submit to server immediately if you write a lot of code today, it is recommended to submit it half an hour before work.

meaning of the three basic directories in Cornerstone: Tags,branch,truck
    • Truck Main Branch, is used to master the direction of development, a new module development, this time on the trunk, when the module development completed, need to modify, with branch.
    • Branch: It is used for parallel development, where parallelism refers to the comparison with the trunk.
    • Tag: is used to make a milestone, whether it is a release version, but is a usable version. Here, it should be read-only. More is a display, giving people a readable mark. we ITOO1.0 stage development completed, you can hit a tag, and then into the development of 2.0. The role of tags is to create a version ID when you merge the code of the bug that was modified on the branches into the trunk. Later, when the bug code modified on the branches is merged into the trunk, it is merged from version of tags to the latest version of branches to the trunk to ensure that the previously modified bug code is no longer merged.

Suppose, for example,Itoo1.0 is developed, this time to do a tag,tag_release_1_0, and then based on this tag to publish, such as the installation program. Trunk into the development of 1.1, but 1.0 found a bug, then you need to do a branch based on TAG_RELEASE_1_0 (branch), BRANCH_BUGFIX_1_0, based on this branch bug modification, until the end of Bugfix, Make a tag,tag_release_1_0_1 and then, as needed, decide whether the BRANCH_BUGFIX_1_0 is incorporated into the trunk.

one thing to note about SVN is that it is the global version number, which is actually a tag, so we can often see what the release is, based on the 2xxxx version of the XXX project. That's what it means. However, it also explicitly gives a tag concept, because it is more readable, after all, it is easier to remember tag_release_1_0 than to remember a large version number.

SVN is really a very powerful tool and he manages our teamwork well.

-----------------git-----------------graphical interface (UI): Cornerstone/versionThis is only a general introduction to Sourcetree, after all, the use of git in China is not common sourcetree

As a lazy git command line I don't really love it so the GUI tools become my first choice
The GIT tools under Mac are a lot of famous tower smartgit and so on (more on the introduction here)

Today we are introducing Sourcetree for Atlassian products and the famous track tool Jira GitHub competitor BitBucket and so on (these two I also often use, especially bitbucket Support Free Private Warehouse Oh ~)

The characteristics of Sourcetree are as follows

  • Free
    Sourcetree is free to use as long as a simple registration.
  • Cross-platform
    Both Windows and Macs can be used
  • Perfect support for GitHub and BitBucket
    All of my GitHub and BitBucket projects are managed with it, and of course the company's projects are sourcetree managed without interference.
  • Support for Git Flow
    Git Flow (translated) is a set of git usage practices that have now been widely recognized and promoted if used properly development management processes will become easier and clearer
This is the Sourcetree Repo list interface is also open when the default interface here can be all the repo unified management also support grouping This is the repo detail interface of Sourcetree here is a separate place for a repo operation Git all the operation you can be in the GUI is very convenient to use the specific details of your own after using it slowly experience it is not much introduced here-----------------xcode-----------------the above svn and git can actually be used directly in Xcode, if you simply implement the commit and update the code inside the server repository, using Xcode can basically be achieved, but sometimes xcode can not meet our requirements or relatively difficult, So we don't normally choose Xcode right away, unless the project is simple.The following is a brief list of some common version control operations for Xcode:Select the corresponding option implementation: Submit the code to the server Code warehouse (note)

iOS development--development Combat & Version Control SVN and git usage explained

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.