- Introduction
- 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.
- Trunk, branches, tags, role
- Trunk
- 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.
- Trunk should only be used for development and will become your next important version of code.
- 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.
- Branches
- There are several types of commonly used branches, which are listed here.
- Release branches
- When the trunk reaches the release preparation stage (or you want to freeze the addition of new features), you should create a release branches.
- Bug fix branches
- The branch can also be used to handle serious bugs found in trunk or release branches.
- Experimental Branches
- 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.
- Tags
- 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.
- 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.
- Use trunk, branches, and tags in detail
- Trunk
- Right-click the folder and choose create repository here"
-
- Select "create folder structure", and then browse the created file structure.
-
- Branches
- Create
- Merge
- Branches to trunk
- This method is commonly used.
- In trunk, select the UI folder, right-click
-
- For example, select "merge"
-
- Select "merge a range of revisions"
-
- Select the directory to be merged. Here, select the UI folder in branches.
-
- Merged
-
- Trunk to branches
- Branches to branches
- Tags
- Similar to branches.
- Meaning
- 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.
- We can also use SVN to manage our knowledge.
Use trunk, tags, and branches in SVN