Merging

Merging is used to incorporate changes from one 'development line' into another.

Note

Subversion's merging has been significantly improved with version 1.5 and its 'merge tracking' support. Most merging features require a Subversion 1.5 server to work. Subsequent explanations assume that you are performing the commands against a Subversion 1.5 server.

Two very common use cases of merging are release branches and feature branches:

For a more indepth information on these use cases, examples and general information, refer to http://svnbook.red-bean.com/.

Warning

As merging can become a rather sophisticated task, there are certain recommandations. The most important ones are:

  • Do only recursive merges and try to always merge on the same 'merge root ', preferably trunk itself or the root of a branch.
  • Avoid merging into a working copy which contains mixed revisions. Therefore do an Update, preferably to HEAD, before.
  • Avoid merging into non-recursively (or incompletely) checked out working copies. Therefore do an Update More on your merge root, selecting all files and directories and the Recurse into subdirectories option.