Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SVN merge local trunk into branch

Disclaimer: I'm relatively new to SVN. Most of my experience is with GIT.

We have a production site with all the code on an SVN trunk. I have a checked out copy that I have been making some changes to. We decided to create a branch for the feature I am building. I went ahead and checked out the branch as well. Now I have a local copy of the trunk with my changes that I need to merge into my local copy of the branch. Once I do that, I am going to discard the local trunk copy as I don't want my changes to be pushed to the production trunk.

How would I go about merging code from a local SVN folder into another local SVN folder?

P.S. I develop on Ubuntu 12.04. I have SVN Workbench installed (but I haven't really used it) and do most of my svn work via command line. If there is a linux GUI that would help with this, I'm ok with that as well.

like image 214
Jeremy Harris Avatar asked Jul 27 '12 13:07

Jeremy Harris


People also ask

What is a sync merge in svn?

The complete merge is used for the 'sync' and 'reintegrate' merges in the 'feature branch' pattern described below. It finds all the changes on the source branch that have not already been merged to the target branch, and merges them into the working copy.

How do I merge two svn revisions?

To merge a range of revisions, use svn merge -r start:end from to where start and end are revision IDs. This will merge all revisions starting at start+1 up to and INCLUDING end . Note: it will NOT include the first revision (ex: -r3:45 will merge 4 through 45).

Do I need to commit after merge svn?

It never should have been committed. You can use svn merge to “undo” the change in your working copy, and then commit the local modification to the repository. All you need to do is to specify a reverse difference.


1 Answers

  1. Switch your working copy with changes to the branch
  2. Commit
like image 119
maxim1000 Avatar answered Oct 01 '22 04:10

maxim1000