Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Merge" new file in trunk into a branch

Tags:

merge

svn

This should be trivial and obvious but I can't find any examples of this. (I'm certain that's because I'm just searching for the wrong words.)

I need to merge a file from the trunk of my repository down into a branch. The file is new in the trunk, and not yet in the branch; therefore, the normal way that I know to do a merge just doesn't work. Thus, I need to get that new file into the branch somehow.

I need to do this selectively with particular files; in other words I don't want to merge down the whole trunk, and I can't even merge a whole changelist.

Thanks for any suggestions.

edit — I realize I can just copy the file from my trunk workspace and svn add it to the branch, but I don't think that's the "right" way to do this.

like image 212
Pointy Avatar asked Nov 12 '10 01:11

Pointy


1 Answers

You can do something like svn cp ^/trunk/file1 ^/branches/mybranch/file1 to copy individual files from the trunk to the branch.

like image 163
Matt McHenry Avatar answered Sep 22 '22 06:09

Matt McHenry