Undoing a commit in TortoiseSVN

后端 未结 3 1197
夕颜
夕颜 2020-12-04 07:41

I committed a bunch of files (dozens of files in different folders) by accident. What is the easiest, cleanest (and safest!) way to \'undo\' that commit without having to de

相关标签:
3条回答
  • 2020-12-04 08:11

    Go to Show Log Screen, select the revision that you want to undo, right click it and select Revert changes from this revision, this will do a reverse-merge.

    0 讨论(0)
  • 2020-12-04 08:15

    You can revert your working copy to the revision prior to the commit. Once you have reverted your working copy, then simply commit the changes and you will effectively rolled back the accidental commit.

    In a case like yours specifically, I would probably check out the revision that I wanted to roll back into a new working copy and then commit the working copy to the head revision.

    0 讨论(0)
  • 2020-12-04 08:16

    You may need to use the command line, but you can use the SVN merge command and specify the revisions in reverse to effectively revert a commit. Assuming your bad commit was r1123, you would do:

    svn merge -r1123:1122 <url of your working copy>
    
    0 讨论(0)
提交回复
热议问题