Use trunk, tags, and branches in SVN

Source: Internet
Author: User

 

  1. Introduction
    1. We all know that SVN is a software used to manage the source code of a project. We can record the code at various stages of development for future use. Do you know the specific structure of SVN? Next we will introduce its basic structure.
  1. Trunk, branches, tags, role
    1. Trunk
      1. This is the main branch of the svn Directory, which indicates the projects in daily development. At any time, trunk contains the latest development code. The code here will work for your next major release version.
      2. Trunk should only be used for development and will become your next important version of code.
      3. Almost all people use trunk to store their code. After a version is issued, the development of the next version is continued. In this way, the development is mixed. If a large bug often fails to be restored to the previous version, a branches file is added.
    1. Branches
      1. There are several types of commonly used branches, which are listed here.
      2. Release branches
        1. When the trunk reaches the release preparation stage (or you want to freeze the addition of new features), you should create a release branches.
      1. Bug fix branches
        1. The branch can also be used to handle serious bugs found in trunk or release branches.
      1. Experimental Branches
        1. Sometimes you want to introduce a new technology into a project. This is good, but you certainly don't want to bet on your entire project. Imagine you want to change your web application from PhP4 to PhP5. How long does it take you to spend? During this period, will your trunk be stopped? Until you have completed all the conversions to PhP5.
    1. Tags
      1. Generally, a tag is used as a milestone. Whether it is release or not, it is a usable version. Here, it should be read-only.
      2. In SVN, the tag and branches are not obvious when creating the time zone in one option. The tags also stores a copy of the trunk, which is only read-only and cannot be modified. The permissions are different.
  1. Use trunk, branches, and tags in detail
    1. Trunk
      1. Right-click the folder and choose create repository here"
        1.  
      1. Select "create folder structure", and then browse the created file structure.
        1.  
    1. Branches
      1. Create
      1. Merge
        1. Branches to trunk
          1. This method is commonly used.
          2. In trunk, select the UI folder, right-click
            1.  
          1. For example, select "merge"
            1.  
          1. Select "merge a range of revisions"
            1.  
          1. Select the directory to be merged. Here, select the UI folder in branches.
            1.  
          1. Merged
            1.  
        1. Trunk to branches
        1. Branches to branches
    1. Tags
      1. Similar to branches.
  1. Meaning
    1. SVN solves the problems of data backup, version control, data synchronization, and so on. Therefore, it is favored and used by many people. It is a good software tool for management knowledge.
    1. We can also use SVN to manage our knowledge.

 

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.