开发者

TortoiseSVN: how do I undo the last Update command?

开发者 https://www.devze.com 2023-03-19 03:47 出处:网络
The last TortoiseSVN Update command loaded work-in-progress code from th开发者_开发百科e trunk which shouldn\'t have been committed yet, and overwrote the files that I had on my branch.

The last TortoiseSVN Update command loaded work-in-progress code from th开发者_开发百科e trunk which shouldn't have been committed yet, and overwrote the files that I had on my branch.

How do I undo that last Update command and revert back to the versions that I had on my machine before the Update?


There is no "undo" or "revert", but if you update to the previous revision, that is the recommended way to accomplish what you are asking for. In TortoiseSVN, select "Update to revision..." and enter the revision number you want to go back to.

revert back to the versions that I had on my machine

If you had local changes on your machine that were never committed (i.e., no revision number), and you updated over them, then you are out of luck. The only way to get back your local changes is if you have a backup (check the "Previous Versions" tab in Windows Explorer...)


Check out this guide for undoing revisions on TortoiseSVN. The entire concept of version control supports the issue you've created for yourself so it is a popular action.


This is called update to revision... In the ui you can choose which version you want to go back to. Make backup copy of your local svn tree first to be safe!


You can update to a specific revision by right clicking on your working copy, Under the TortoiseSVN menu item, there is a update to revision menu option that will allow you to change your working copy to the revision of your choice. If you do a show log on the repository you can get an idea of when the offending code got committed and revert back to the prior repository revision. As a precaution, I would make a copy of and working copy, or important files in your working copy, to ensure that if things go bad, you can always get back to where you are now.

Now this changes your working copy, not the repo, so if you are wanting to revert the repository back, then that is a different issue, but I do not think that is what you are asking for.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号