Subversion: How to merge only specific revisions into trunk when multiple consecutive changes are made in a branch?

前端 未结 8 1868
孤街浪徒
孤街浪徒 2020-12-09 10:34

I have been using TortoiseSVN, svn, and subclipse and I think I understand the basics, but there\'s one thing that\'s been bugging me for a while: Merging introduces unwante

8条回答
  •  [愿得一人]
    2020-12-09 11:01

    Another thing you could do would be to manually undo the bad commit on the branch, which would then allow you to merge the branch back into the trunk as you would normally.

    TortoiseSVN

    Using TortoiseSVN you open up the log view on a file, select the offending version, and choose "Revert changes from this revision" from the right click menu. Commit the changes it makes on your working copy and then you can merge the branch back in easily.

    Command Line

    To do this with the command line client you perform a reverse merge, (This is taken from the Pragmatic Source Control using Subversion book) where you merge the changes between the offending version and the previous version into the working copy of the file. Then as above you'd commit the changes and can then branch normally. In your example you would do something like:

    svn merge -r 4:3 test.txt
    

提交回复
热议问题