开发者

Do I need to checkout both TRUNK and BRANCH to merge branch back into trunk

开发者 https://www.devze.com 2023-01-17 18:25 出处:网络
Having an issue, here is the problem. Created a branch from the trunk, made changes to the branch on local dev box, committed changes and now I want to merge my changes in the branch to the trunk.

Having an issue, here is the problem.

Created a branch from the trunk, made changes to the branch on local dev box, committed changes and now I want to merge my changes in the branch to the trunk.

I run the command: 46 is the version where I created the branch, 49 is the branch version now

sudo svn merge -r 46:HEAD http://path/to/branch/repo/verion/that/is/checkout

After 开发者_JAVA技巧running this command I look in the web GUI to see if my changes have been made to the trunk, but I don't see them. Then I thought maybe I should run the commit command.

sudo svn commit -m "Merging branch into trunk"

Still after checking the trunk I don't see my changes.

Can someone please tell me what I'm doing wrong?

Thanks


You should make sure your working copy is at trunk by switching to trunk:

cd /path/to/workingcopy
svn switch http://server/svn/repo/path/to/trunk

Before merging, make sure you're up to date (run svn update, and there are no dirty files.

Then you can merge from the branch to the trunk working copy:

svn merge -r 46:HEAD http://server/svn/repo/path/to/branches/MyBranch

This will probably change files, and allow you to commit the merge

0

精彩评论

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

关注公众号