Merge branch with trunk

前端 未结 4 701
面向向阳花
面向向阳花 2021-01-29 17:39

Using TortoiseSVN, I need to take changes I\'ve done in a branch and then merge them with trunk.

I am the only developer on this project, so I know trunk hasn\'t chang

4条回答
  •  佛祖请我去吃肉
    2021-01-29 18:22

    In your case:

    1. Switch the working copy to the trunk (SVN Switch)
    2. Merge the branch into the working copy (SVN Merge)
    3. Make sure everything still compiles and works
    4. Commit the working copy (the trunk)
    5. Consider killing the branch

    In a team environment I would suggest that you first merge the latest modifications from the trunk in your branch, make sure that everything compiles and works, then do the above steps (which will be trivial since you've already tested the changes).


    Update

    In step 5, I mention killing the branch. That's because once a branch from a feature is in the trunk, it should be considered as part of the trunk. In that case the branch should be killed so that no one keeps working on it. If major modifications are needed for that feature, you should create a new branch for that.

    The only branches that I don't kill are maintenance and release branches, unless a particular release is no longer supported.

    No matter what, you always have access to every revision so killing a branch is only used to prevent other developers from developing on a dead branch.

提交回复
热议问题