简体   繁体   中英

SVN how do I check code into a specific branch, when I've checked code out from the trunk?

我需要检查我的代码更改到某个分支,但我不知道如何做到这一点,因为我的代码来自trunk = /

cd workingcopy
svn checkout http://my.repos.com/path/to/trunk
# make your edits
svn switch http://my.repos.com/path/to/branch
svn commit

Now your working copy points to the branch instead of the trunk. You could also check out the branch as a separate working copy, then drag-and-drop your changes into it.

Using Switch allows you to change a checkout from one repository location to another, such as Trunk to a branch.

Then you can commit the changes to the branch.

Using TortoiseSVN you can Perform Switch doing the following.

  1. Right Click on the Directory in question you want switch.
  2. Select TortoiseSVN | Switch
  3. Change the Repository Location from the current one to the new location.

The documentation for this can be found here .

You need to have a working copy of the branch you want to commit to. So check it out in a separate directory, or use svn switch .

In addition to switching, you can also create a patch.

http://ariejan.net/2007/07/03/how-to-create-and-apply-a-patch-with-subversion/

我不确定确切的位置,但将更改合并到分支可能是一个想法。

I'm not sure of the exact situtation, but it might be an idea to merge changes in to the branch

or

You need to have a working copy of the branch you want to commit to. So check it out in a separate directory, or use svn switch.

Ok I found a way to do this. Check out the branch, copy code changes, and the recommit from checked out branch =]

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