Skip to content

Instantly share code, notes, and snippets.

@willpracht
Created January 28, 2014 21:04
Show Gist options
  • Save willpracht/8676474 to your computer and use it in GitHub Desktop.
Save willpracht/8676474 to your computer and use it in GitHub Desktop.
Common SVN branching scenarios.
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"
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment