1

直到昨天我才使用分支,所以我不知道我应该把分支变成我们的树干。所以我分支了一个子文件夹,这导致了一些副作用,比如意外地将主干切换到分支......这导致用子文件夹覆盖主干并删除主干内的所有其他内容 = 破坏我的工作副本;/

现在,我想用我的工作副本覆盖这个有问题的分支。如何执行此操作?我正在使用乌龟 SVN。

4

1 回答 1

8

It's easily possible via commandline:
You can switch your working copy back to trunk with svn switch TrunkURL in your local repo.

Use svn remove URL to remove the branch, you then can recreate the branch with the right source. With svn switch branchURL you can switch your local copy to the newly created branch.

With TortoiseSVN:

  • Rightclick on your repo, go into the Tortoise-menu and select Switch. Select your trunk, you will then have your local repo back to trunk.
  • Go into the Tortoise SVN Repo browser, there locate your branch. Right click on it and remove it
  • Recreate the branch by rightclicking your trunk and selecting Copy to...
  • Switch your local repo with the switch command from the first point. This time just select the branch instead of trunk.

No worries, you won't lose any files stored in the SVN. Even your first branching-experiment will stay in there at a certain Revision.

于 2013-04-10T07:52:36.363 回答