- 1 year ago
SVN cmd to update without restoring files
In Subversion (SVN), the svn update
command is used to bring your working copy up to date with the latest changes from the repository. By default, svn update
will also restore files that you have locally modified to their repository state. If you want to update your working copy without restoring modified files, you can use the --no-restore
option (also known as --accept theirs-full
or --accept tf
).
Here's the command:
bashsvn update --accept theirs-full
This command tells Subversion to accept "theirs" as the version to keep for all conflicts. In other words, it will use the repository version of the file for any conflicts, effectively overwriting your local modifications without prompting.
Please note that using --accept theirs-full
should be done with caution, as it will discard your local changes in favor of the repository version without any possibility of recovery. Make sure you have a backup of your changes if needed.
Additionally, keep in mind that --accept theirs-full
applies to all conflicts. If you want more fine-grained control over specific conflicts, you might need to manually resolve conflicts for individual files during the update process.