Difference between revisions of "Restoring old revisions from SVN repository"

From Notes_Wiki
(Created page with "=Restoring old revisions from SVN repository= ==Restoring entire tree== We have to different options of restoring old versions using svn. We can either restore entire svn tre...")
 
m
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
=Restoring old revisions from SVN repository=
[[Main Page|Home]] > [[CentOS]] > [[CentOS 6.x]] > [[Versioning tools]] > [[Subversion|Subversion (SVN)]] > [[Restoring old revisions from SVN repository]]


==Restoring entire tree==
==Restoring entire tree==
Line 18: Line 18:
svn update -r <revision_number> <file_name>
svn update -r <revision_number> <file_name>
</pre>
</pre>
[[Main Page|Home]] > [[CentOS]] > [[CentOS 6.x]] > [[Versioning tools]] > [[Subversion|Subversion (SVN)]] > [[Restoring old revisions from SVN repository]]

Latest revision as of 15:37, 24 August 2022

Home > CentOS > CentOS 6.x > Versioning tools > Subversion (SVN) > Restoring old revisions from SVN repository

Restoring entire tree

We have to different options of restoring old versions using svn. We can either restore entire svn tree along with subfolders and files or we can restore just one single file.

To restore entire tree or single file we can use:

svn export -r <revision_number> <path_to_file_or_directory>

Note that this will result into overwriting of existing files / directories. Hence this should be used only after committing latest changes, so that important work is not lost.


Restoring a file

To restore a file to some previous revision we can use:

svn update -r <revision_number> <file_name>



Home > CentOS > CentOS 6.x > Versioning tools > Subversion (SVN) > Restoring old revisions from SVN repository