Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Subversion committing uncommitted changes to a new branch

Tags:

branch

svn

I should have taken a branch to start with but decided to work on trunk instead, and now I want to create a branch and commit my uncommitted changes to that branch instead of trunk.

Is there an easy way to do that in svn?

like image 317
Abidi Avatar asked May 18 '11 09:05

Abidi


People also ask

How do you apply uncommitted changes to another branch?

Using the git checkout Command The git checkout -b <BranchName> command will create a new branch and switch to it. Moreover, this command will leave the current branch as it is and bring all uncommitted changes to the new branch.

How do I commit a change to a new branch in SVN?

In order to do that, you only need to follow three steps: Create a new branch in which you will commit your changes. Switch your current working copy to this new branch. Commit your changes to the new branch.

What is the command to store uncommitted temporarily?

The "git stash" command can help you to (temporarily but safely) store your uncommitted local changes - and leave you with a clean working copy.


1 Answers

You can use the switch command to switch your working copy the branch and afterwards you can commit the changes you made to the branch. But don't mix changes for trunk/branches. Do the following in your working copy:

svn switch URL/branches/BRANCHNAME

and after changing do the commit.

like image 198
khmarbaise Avatar answered Sep 20 '22 17:09

khmarbaise