I performed an svn co -r XXX ...
. I deleted a file and then [accidentally] performed svn up
. That updated to HEAD, so I lost my changes at XXX.
Is it possible to perform an update against a particular revision? If so, how?
Related, it is possible to undo the update to HEAD so I go back to XXX + local revisions?
svn update brings changes from the repository into your working copy. If no revision is given, it brings your working copy up to date with the HEAD revision. Otherwise, it synchronizes the working copy to the revision given by the --revision ( -r ) option.
Simply type svn update [name-of-directory] , or cd to that directory and type svn update there.
"svn info --show-item revision" will give the current revision to which the current directory is updated.
svn update brings changes from the repository into your working copy. If no revision is given, it brings your working copy up to date with the HEAD revision. Otherwise, it synchronizes the working copy to the revision given by the --revision ( -r) option.
If HEAD is equal to the last revision number, it can skip it. The command returns a list with all files that are changed/added/deleted in this revision period. The command can be called with the URL revision parameter to check changes like this: svn diff -r REVNO:HEAD --summarize SVN_URL
This is used to test a specific rev purpose, if your test has done, you can use this command to test another rev or use SVN Update to get HEAD If you want to undo an earlier change permanently, use Revert to this revision instead.
I've started to use Subversion with TortoiseSVN. If I open up the log and right click on an old revision I see two options that sound like they roll back to an older version: "Update item to revision" and "Revert to this revision".
Use svn update -r <old revision number>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With