Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Commit changes to a different branch than the currently checked out branch with subversion

People also ask

What is difference between commit and update in svn?

Commit uploads your changes on the CVS / SVN server, and Update overwrites the files on your localhost with the ones on the server.

What happens when a branch is created in subversion?

Subversion Branching Strategies Subversion branches (SVN branches) allow your team to work on multiple versions of your code simultaneously. Developers can test out new features without impacting the rest of development with errors and bugs. SVN's “branch” directory runs parallel to the “trunk” directory.


You should create a branch from a known sourceURL (this would be your 'development line' you mentioned in the question) first:

svn copy sourceURL branchURL

Then, switch to that branch:

svn switch branchURL

And commit your changes:

svn commit

You could do it in the TortoiseSVN like that:

  • Right click on the directory where are the changes you want to branch. It must not be the root of the repository, less to duplicate in that way;
  • Select TortoiseSVN -> "Branch/tag...";
  • Set To URL: "svn://host/repository/FooBar/branches/FooBarBranchName";
  • Make sure [*] Working copy is selected. This will ensure the changes are commited;
  • Log message: "Experimenting with flies :)";
  • Optional: Tick [*] Switch working copy to new branch/tag. This is useful if you are planning to keep working on the new branch. Although you can switch to it later too.
  • Try to find the OK button. Hint: it is in the lower part of the window centred.

Enjoy!


You can create a new branch directly from your working directory and switch the working directory to that branch.

The commands are svn copy and svn switch