26Merging Changes from Trunk to Branch

When stabilizing your code ready for release, it’s best to fix bugs on the trunk and then merge the fixes to the branch. If you do things the other way around, you might forget to merge a fix back to the trunk, and it will show up as a regression in your next release.

Fix the bug on the trunk, and note the revision number where the fix was checked in. In a branch working copy, merge the revision or revisions from the trunk. In most cases, the merge will work automatically without any conflicts. The merge works kind of like an update; think of the branch as an old working copy that needs to incorporate new changes from the trunk to keep it up-to-date. If the trunk and the branch have diverged, though, ...

Get Pragmatic Guide to Subversion now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.