How do I overwrite my local changes in TortoiseSVN?

和自甴很熟 提交于 2019-12-03 22:25:44

right click-tortoise svn-revert

You can either revert the changes (right-click, it's an option) or you can delete the file(s) in question and update. The difference is, revert will revert to the last version you checked out, while delete and update will "revert" to the latest version in the repository, depends on what you're trying to accomplish. Oh, and revert can be done w/out access to the repository, where delete and update can't.

Andy adds a good point that a diff is in order to make sure you're discarding what you think you're discarding. Many times I've forgotten about changes I've made and blew away more than I thought I was.

From the Explorer context menu, TortoiseSVN, Revert (you may have moved some common commands up from the Tortoise sub-menu to the main context menu).

However, before reverting, I would do a diff (context menu, TortoiseSVN, Diff with previous version) to be certain that you are only throwing away what you think you're throwing away.

It is very easy to only think of the most recent changes and forget that you haven't committed something you want to keep.

revert.

It should appear in the menu when you right click on the file you changed. That should lose your changes.

If you just update then Subversion will merge the changes made in the repository into your local copy. An update won't cause your changes to be sent to the repository.

To remove your changes from your working copy, select the files/directories you want to revert and choose Revert from the TortoiseSVN menu.

Just delete the folders (not svn delete, but file-system delete) that contain those files, then sync from a common root to replace them.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!