Name
svn switch — Update working copy to a different URL.
Synopsis
svn switchURL
[@PEGREV
] [PATH
]
switch --relocateFROM
TO
[PATH
...]
Description
The first variant of this subcommand (without the
--relocate
option) updates your working copy to
point to a new URL—usually a URL that shares a common ancestor with
your working copy, although not necessarily. This is the Subversion
way to move a working copy to a new branch. If specified,
PEGREV
determines in which revision the
target is first looked up. See Traversing Branches for an in-depth look at
switching.
If --force
is used, unversioned obstructing
paths in the working copy do not automatically cause a failure if
the switch attempts to add the same path. If the obstructing path is
the same type (file or directory) as the corresponding path in the
repository, it becomes versioned but its contents are left untouched
in the working copy. This means that an obstructing directory’s
unversioned children may also obstruct and become versioned. For
files, any content differences between the obstruction and the
repository are treated like a local modification to the working
copy. All properties from the repository are applied to the
obstructing path.
As with most subcommands, you can limit the scope of the
switch operation to a particular tree depth using the
--depth
option. Alternatively, you can use the
--set-depth
option to set a new
“sticky” working copy depth on the switch target. Currently, the depth of a working copy directory can only ...
Get Version Control with Subversion, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.