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?
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.
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.
The "git stash" command can help you to (temporarily but safely) store your uncommitted local changes - and leave you with a clean working copy.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With