Francisco
Francisco

Reputation: 2228

SVN Switch from branch to trunk

I am currently in /branches/private/issueNum and I want to go back to /trunk/ without bringing any of the changes I had made in /branches/private/issueNum so I can then start working on a new issue.

I am just unsure if I should be using svn switch .../trunk/ or svn checkout .../trunk.

Upvotes: 7

Views: 10214

Answers (1)

bahrep
bahrep

Reputation: 30662

In case the working copy has no local uncommitted modifications, run svn switch ^/trunk. The switch will complete faster than a clean checkout and it will not move any changes from ^^/branches/private/issueNum to the trunk.

You can also run svn checkout to obtain a clean new working copy of trunk. But it's going to take a bit more time (actually depends on the size of the project) than switching.

Read the documentation: SVNBook | Traversing branches.

Upvotes: 9

Related Questions