svn merge a revision on trunk to a branch

Merging a set of files from Trunk to a branch

The scenario is that you have made changes to a selection of files and committed them all in one revision.  You then wish to merge only these changes into a branch (e.g. for release).  How can you grab just your changes and merge these?

  1. Find the revision number on trunk that you want to merge into the branch
  2. Check out the branch to your local machine
  3. cd to the branch directory on your machine
  4. make the call: svn merge -c [revision_number] [trunk directory]
  5. svn merge -c 896929 ../trunk

-c gets the differences between the files in the revision you specify and the one before.  It will then try to merge these changes into the branch.

You can use the –dry-run switch to preview the outcome before going ahead with the merge.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s