svn undo old commit, keep newer ones
I know I can do a reverse merge. But that seems like it is good for undoing the most recent commit. I have a more complex problem:
r100 - I want to undo this one
r101 - Keep
r102 - Keep
r103 - Undo this one as well
r104 - Keep
r105 - Keep
r106 - HEAD
Is there an easy way of doing this? r103 modifies r10开发者_开发技巧0, others modify different files.
I would try this: undo r103 with a reverse merge, then undo r100 with a reverse merge.
Notice that you cannot remove committed revisions from the repository, however you can let SVN automatically modify your local working copy in a way that it reverts a revision or a range of revisions. That is e. g., if you added a line, it will remove it in your working copy, if you had removed a file, it will add it again etc.
See Nanne's answer for the command-line version of doing this. In TortoiseSVN on Windows, just click "Undo changes from this revision" in the log window.
AFter that, simply commit the changes in your working copy.
You can not easily remove past commits in an SVN repository.
Please see this question in the SVN FAQ
精彩评论