User Tools

Site Tools


classes:csci345_slator:merging_and_branching

Merging and Branching

The following are notes for beginning of the semester preparation for merging work back into trunk, and creating a new branch for a new class.

These tutorials are taken from Stack Overflow, regarding questions on merging back into trunk and the proper way to create a branch in SVN.

Merging back into Trunk

First off, I'd highly recommend using a Unix machine for this work. Trying to get third party clients on Windows or other wacky binaries to pull this off would work, but it's a bit non-standard. The best solution is to log into lions.cs.ndsu.nodak.edu to complete the following, as the SVN versions will be (obviously) compatible.

First, check out the latest version of trunk. Run an SVN command to merge your current working copy with the branch you wish to merge with. Then commit those results. The following commands make that happen:

# Checks out the repository and places it in the directory named "blackwood_trunk"
svn checkout https://lions.cs.ndsu.nodak.edu/svn/blackwood/trunk blackwood_trunk
cd blackwood_trunk

# This is the command to merge some branch with your present working copy.  This is targeting CS345_Spring2012.
# This will merge your local trunk with the branch.  This does not change anything on the server side, just your local copy.
svn merge https://lions.cs.ndsu.nodak.edu/svn/blackwood/branches/CS345_Spring2012

# Now commit your merged copy of trunk.
svn commit

Making a new Branch

Making a new branch is relatively simple. You don't even need to check anything locally, you can just run the following command:

# svn copy "TRUNK" "New Branch Location" 
svn copy https://lions.cs.ndsu.nodak.edu/svn/blackwood/trunk https://lions.cs.ndsu.nodak.edu/svn/blackwood/branches/CS345_Spring2013
classes/csci345_slator/merging_and_branching.txt · Last modified: 2017/01/14 00:27 by localadmin