SVN how do I check code into a specific branch, when I've checked code out from the trunk?

qodeninja picture qodeninja · Oct 29, 2009 · Viewed 20.2k times · Source

I need to check in my code changes to a certain branch but im not sure how to do that since my code is from trunk =/

Answer

Michael Hackner picture Michael Hackner · Oct 29, 2009
cd workingcopy
svn checkout http://my.repos.com/path/to/trunk
# make your edits
svn switch http://my.repos.com/path/to/branch
svn commit

Now your working copy points to the branch instead of the trunk. You could also check out the branch as a separate working copy, then drag-and-drop your changes into it.