简体   繁体   中英

How do I update my SVN working copy to the changes from one specific revision, and not include previous revisions?

Using Subversion, is there a way to merge the changes from one specific revision into the trunk? Basically I have a lot of revisions that have been made, but I need to update my working copy with only the latest revision, and not all of the others in between.

Would I do some sort of merge?

I think you are looking for " cherrypicking ", yes it's a case of merging some revisions back to the trunk.

If you have a GUI client like TortoiseSVN the merge command will help you through the procedure (choose Merge a range of revisions ).

Assuming you mean merge a specific revision from a branch into the trunk...

If you're using TortoiseSVN, you can do:
Right click trunk-->TortoiseSVN-->Merge...
Choose "Merge a range of revisions"
Enter a specific revision number into the "Revision range to merge" textbox

If you're not using tortoise, then you can do the same thing with command line svn's "merge -r" command.

The trunk and your working copy are two different things -- I take it from this, that the trunk contains the revisions you want and some that you don't want, and that you don't have branches.

One thing to do is to branch from the trunk at the point that your current working copy is from. Then merge the one revision you want into that branch and work off the branch. When you are ready, merge back into the trunk.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM