开发者

How to copy files from one branch to another from SVN CLI or TortoiseSVN?

I'm trying to move certain files fro开发者_开发技巧m one branch to another or many but when I try to copy (using tortoiseSVN) it tells me the folder already exists :/ is there anyway to propagate changes from one branch to others?


If the versions of the file in both branches have a common ancestor (so their content is mostly similar) and you want to propagate the changes, you probably want to be performing a merge.

This is a complicated subject, and there are many ways to go about it, so you probably want to read what the SVN book has to say on the topic.

The basic concept though, is you check out a copy of the target branch, and then use the merge command to pull in the changes from the source branch and revisions in question, then verify everything works as expected and check in:

svn co http://www.example.com/svn/branches/release
cd release
svn merge -c1234 http://www.example.com/svn/trunk # merges changes made in r1234
# Build the software, run automated tests, etc.
svn ci -m "Merged revision 1234 from trunk to release branch."
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜