How do I overwrite my local changes in TortoiseSVN?

后端 未结 6 2245
一整个雨季
一整个雨季 2021-02-18 15:46

Lets say I did a check out, edited some stuff and realized I want to re-download the repository code and overwrite my local changes without commiting them.

I downloaded

相关标签:
6条回答
  • 2021-02-18 16:14

    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.

    0 讨论(0)
  • 2021-02-18 16:23

    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.

    0 讨论(0)
  • 2021-02-18 16:33

    revert.

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

    0 讨论(0)
  • 2021-02-18 16:36

    right click-tortoise svn-revert

    0 讨论(0)
  • 2021-02-18 16:37

    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.

    0 讨论(0)
  • 2021-02-18 16:39

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

    0 讨论(0)
提交回复
热议问题