Undoing specific revisions in Subversion

后端 未结 3 1879
隐瞒了意图╮
隐瞒了意图╮ 2020-12-23 14:05

Suppose I have a set of commits in a repository folder...

123 (250 new files, 137 changed files, 14 deleted files)
122 (150 changed files)
121 (renamed folde         


        
3条回答
  •  囚心锁ツ
    2020-12-23 15:08

    To undo revisions 118 and 120:

    svn up -r HEAD       # get latest revision
    svn merge -c -120 .  # undo revision 120
    svn merge -c -118 .  # undo revision 118
    svn commit           # after solving problems (if any)
    

    Also see the description in Undoing changes.

    Note the minus in the -c -120 argument. The -c (or --change) switch is supported since Subversion 1.4, older versions can use -r 120:119.

提交回复
热议问题