Thomas Jespersen
Thomas Jespersen

Reputation: 11793

How do we rebase a Subversion trunk with all files from a branch?

We have developed version 2.0 of our website, in a branch. Now the site is live, and we want our branch to replace the trunk (inkl. all history etc.).

We made a few bug fixes to the trunk, but they are all integrated in the branch. That is... all code in the trunk are dead code, and we want the trunk exactly like the branch..

Which steps should we take to rebase (is that the right term) our branch to the trunk in Subversion?

Upvotes: 0

Views: 4060

Answers (1)

rioki
rioki

Reputation: 6118

svn can not rebase, since the entire repo is under version control. To rebase is inserting changes into the beginning of a branch. svn has basically no branches.

What you need to do is copy or move your brach to the trunk.

copy:

svn rm trunk
svn cp branches/live_site trunk

or move:

svn rm trunk
svn mv branches/live_site trunk

If you like you can also try to merge the branch into the trunk.

cd trunk
svn merge branches/live_site

Upvotes: 5

Related Questions