Better way to revert to a previous SVN revision of a file?

前端 未结 9 1154
小鲜肉
小鲜肉 2020-12-04 04:34

I accidentally committed too many files to an SVN repository and changed some things I didn\'t mean to. (Sigh.) In order to revert them to their prior state, the best I coul

9条回答
  •  忘掉有多难
    2020-12-04 05:15

    svn merge will merge revisions, not revert them. i.e. if you have some addition in your HEAD version then merge that with a previous revision, then the change will persist.

    I use svn cat then redirect it into the file:

    svn cat -r 851 l3toks.dtx > l3toks.dtx
    

    Then you have the 851 content in that file and can check it back in.

提交回复
热议问题