How to merge branch with trunk using SVN in android studio

后端 未结 3 2165
轮回少年
轮回少年 2021-02-08 19:31

I would like to commit my changes in the branch and add those changes to the trunk version using the built-in svn tool in Android Studio. How can I do it?

Should I expec

3条回答
  •  花落未央
    2021-02-08 20:13

    5 years later...

    I am using Android Studio 3.1.5 and SVN.

    To merge back a branch to its trunk:

    1. Switch to the trunk. In TortoiseSVN, it is easy to switch. Right click on your working copy -> TortoiseSVN -> Switch.
    2. You should see a dialog window like below. In To Path field, make sure that it points to your trunk folder. In Revision field, I always choose HEAD revision so I transfer everything from the branch to trunk. Click OK.

    1. In Android Studio (AS), make sure that the switch worked. To verify, go to the task bar at the bottom of your AS. Click Version Control -> Subversion Working Copies Information -> Refresh. See if URL field points to your trunk.

    1. Start the merging. Click Version Control -> Subversion Working Copies Information -> Merge From.... In the small pop-up window, select the branch you want to merge to trunk. It may also ask for which directory or file in the said branch you want to merge. Make the appropriate selection.
    2. In Select Merge Variant window, most of the time I select Merge All because that is usually the goal. Click OK.

    1. Finally commit the newly merged changes.

    NOTE: I prefer merging the trunk to my branch first. Resolve the conflicts in the branch, then finally, merge back to trunk.

提交回复
热议问题