PositiveGuy
PositiveGuy

Reputation: 47733

Merging Branch back into Main Trunk

What's the best way to merge the branch back into the trunk? I assume do an SVN merge to your working copy, merge the changes and check back in? So I'd merge FROM the mainline TO my branch?

Upvotes: 0

Views: 669

Answers (3)

zeocrash
zeocrash

Reputation: 665

I usually check out the head revision of the trunk, merge it with the head revision of the branch and then commit

Upvotes: 1

jkndrkn
jkndrkn

Reputation: 4062

I usually do the following:

  1. merge: trunk -> branch; commit
  2. merge: branch -> trunk; commit

This ensures that your branch contains all the most up-to-date changes in trunk and that when you merge your branch back into the trunk, you don't accidentally clobber changes made in the trunk since the last merge.

Since Subversion does not track merges very well, I usually enforce the following commenting scheme:

"$PROJECT_NAME - merge: $BRANCHNAME -> trunk"

or

"$PROJECT_NAME - merge: trunk -> $BRANCHNAME"

Upvotes: 1

GraemeF
GraemeF

Reputation: 11457

Get an up-to-date working copy of trunk and merge your branch into it, make sure it isn't broken, then commit.

Upvotes: 0

Related Questions