TortoiseSVN merging branch back into trunk 1

Merging changes back into the trunk incorrectly can really screw things up.  Trust me, I found out the hard way.   Below is a checklist of steps to follow.

1.    Update trunk from repository
2.    merge branch from trunk and take care of any conflicts
3.    View localhost and make sure everything looks good
4.    Commit merge changes to branch repository
5.    Merge branch into trunk locally.  Perform a test run first, then merge.
6.    Fix any conflicts
7.    Commit to repository trunk
8.    View development or staging server to verify changes

Below is the interface for TortoiseSVN and sample data for when you “merge two different trees”.  Select the trunk in the first drop down and the branch in the second drop down.  The result of the merge will be stored in the trunk.  Remember to commit your changes afterward.

SVN merging with TortoiseSVN

If you’re going to perform a merge, I can assume you’ve already created, checked out, and have made modifications to a branch from your code repository.  On your checkout, right click a directory or single file and select “TortoiseSVN” then “Merge” from the context menu.

From the next window, you may need to alter the “From” URL to your repository.  This will most likely be pointing to the same directory or single file in the trunk of your repository.  For beginners, this can be confusing.  What the interface is asking you to do is specify a revision range to merge with your files.  In most cases, the “From” and “To” URL will be exactly the same.  The difference is the “From” entry where you’ll need to specify the beginning revision number to start the merge.  The “To” entry will usually be the “Head Revision” if you’d like to get the most recent commits.  The “result of the merge” will automatically point to your branch.  Perform a “Dry Run” the first couple times until your comfortable with the process.

Watch for conflicts

Edit and resolve conflicts, then commit all changes to your branch.