Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>The short answer: No</p> <p>This is why God created <code>svn switch</code> in the first place. It allows you to change your underlying branch of your working directory without losing your work.</p> <p>Think of it this way: How many times has a developer broke something because they've said to themselves <em>"Hey, I don't have to test this. It's a <strong>minor</strong> change"</em>?</p> <p>Even if Subversion allowed you to do what you want, it would still be a bad idea. You'd basically be making changes in a codebase with no real way of making sure they work in the first place. This is why Subversion requires you to have a working directory before you can make changes<sup>*</sup>. How would you test your changes?</p> <p>If you don't want to use <code>svn switch</code> because you don't want to lose your work, you could do the following:</p> <ul> <li>Copy your entire working directory to another location, then use <code>svn switch</code> on one to make that trunk.</li> <li>Finish your work on your branch. Commit the changes and note the revision number. Now, either do a <code>svn co</code> or <code>svn switch</code> to get a trunk working copy. Then use <code>svn merge -r</code> to merge your changes into trunk. And, of course, test your changes before committing them.</li> </ul> <hr> <p><sup>*</sup>Subversion does allow <code>mkdir</code>, <code>cp</code>, <code>mv</code>, and <code>rm</code> to work directly upon a URL, but that's mainly to allow you to manipulate branches without having to create a working directory.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload