Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any way to commit changes that I've made to my SVN checkout of trunk to a branch instead?

Tags:

branch

svn

trunk

I just started working on some changes against trunk on an SVN repo, thinking they would be somewhat small. Now, I actually am beginning to realize that I probably should have just started a new branch instead. Rather than making a branch, and then moving each individual piece into it, is there any way to make a new branch and then commit the changes in my working copy to it?

like image 401
Jason Baker Avatar asked Oct 03 '09 18:10

Jason Baker


People also ask

How do I commit changes to svn repository?

Select any file and/or folders you want to commit, then TortoiseSVN → Commit.... The commit dialog will show you every changed file, including added, deleted and unversioned files. If you don't want a changed file to be committed, just uncheck that file.

How branching works in svn?

Subversion Branching StrategiesSVN's “branch” directory runs parallel to the “trunk” directory. A SVN branch copies the trunk and allows you to make changes. When the new feature is stable, the branch is merged back.

What is merge in svn?

In Subversion terminology, the general act of replicating changes from one branch to another is called merging, and it is performed using various invocations of the svn merge subcommand. In the examples that follow, we're assuming that both your Subversion client and server are running Subversion 1.7 (or later).


Video Answer


1 Answers

  1. make a new branch from the place where you started developing
  2. switch to the newly created branch
  3. commit the local changes (will commit to the new branch)

DO NOT MAKE ANY CHECKOUT

I do it with svn 1.6.5, it works without trouble but if you are really paranoid you could do following:

  1. create a patch from current working copy
  2. create a branch
  3. switch to it
  4. apply the patch
  5. commit
like image 100
jdehaan Avatar answered Sep 23 '22 08:09

jdehaan