willpracht
1/28/2014 - 9:04 PM

Common SVN branching scenarios.

Common SVN branching scenarios.

cd /trunk
svn update
# note the current revision number of the trunk

cd /branches/myBranch
svn log
# note the revision number at which your branch was created
svn merge -r [branchRevNum]:[trunkRevNum] svn+ssh://username@svnserver/project/trunk
svn ci -m "Merged trunk into myBranch - r[branchRevNum]:[trunkRevNum]"

# trunk is now merged into your branch
cd /branches/myBranch
svn log --stop-on-copy
# note the revision number your branch at which your branch was created

cd /trunk
svn update
# note the revision number at which your trunk is at currently

svn merge -r[branchRevNum]:[trunkRevNum] svn+ssh://server/project/branch/myBranch
# resolve any conflicts

svn ci -m "MERGE myProject myBranch [branchRevNum]:[trunkRevNum] into trunk"