What do “branch”, “tag” and “trunk” mean in Subversion repositories?

前端 未结 16 1672
后悔当初
后悔当初 2020-11-22 11:51

I\'ve seen these words a lot around Subversion (and I guess general repository) discussions.
I have been using SVN for my projects for the last few year

16条回答
  •  暗喜
    暗喜 (楼主)
    2020-11-22 12:23

    Now that's the thing about software development, there's no consistent knowledge about anything, everybody seems to have it their own way, but that's because it is a relatively young discipline anyway.

    Here's my plain simple way,

    trunk - The trunk directory contains the most current, approved, and merged body of work. Contrary to what many have confessed, my trunk is only for clean, neat, approved work, and not a development area, but rather a release area.

    At some given point in time when the trunk seems all ready to release, then it is tagged and released.

    branches - The branches directory contains experiments and ongoing work. Work under a branch stays there until is approved to be merged into the trunk. For me, this is the area where all the work is done.

    For example: I can have an iteration-5 branch for a fifth round of development on the product, maybe a prototype-9 branch for a ninth round of experimenting, and so on.

    tags - The tags directory contains snapshots of approved branches and trunk releases. Whenever a branch is approved to merge into the trunk, or a release is made of the trunk, a snapshot of the approved branch or trunk release is made under tags.

    I suppose with tags I can jump back and forth through time to points interest quite easily.

提交回复
热议问题