TFS - 如何再次分支?
我有一个大型项目,我对其进行了分支以对分支进行一些更改。现在我在分支上工作了一段时间,再也没有分支回主干。然后我切换回主目录,继续向主目录添加更多功能。现在我需要再次在上一个分支上工作,但是我认为我需要首先使用我对主分支所做的更改来更新分支。我怎样才能做到这一点?这是正确的方法吗?
I have a large project which I branched to make some changes to the branch. Now I worked on the branch for a while and never branched back to the main. Then I switched back to the main and continued to add more features to the main. Now I need to work again on the previous branch, however I think I need to first update the branch with the changes that I made to the main. How can I do that? Is this the correct approach?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
右键单击主分支中的文件->合并->选择您要合并到的分支。
Right click on the file in the main branch -> Merge -> choose the branch you want to merge to.
抱歉,但听起来您不想再次“分支”,您想要合并。首先,确保您映射了一个包含主干和分支的工作空间。然后,右键单击主干(主干)并选择“合并”——如果您使用的是 TFS 2010,这将位于右键单击的“分支/合并”下。
确保您的目的地正确,在这种情况下,听起来您可以合并当前为止的所有文件。这会将主干中的所有更改与分支中的更改合并。合并操作完成后,并且解决了任何/所有冲突,请签入分支上的更改。
Sorry, but it sounds like you don't want to "branch" again, you want to merge. First, make sure you have a workspace mapped that contains both the trunk and the branch. Then, right click on the trunk (main) and choose "merge"-- if you're using TFS 2010, this will be under Branching/Merging on the right click.
Make sure your destination is correct, and, in this case it sounds like you can merge all files up until current. This will merge all changes in the main trunk with the changes you have in your branch. Once the merge operation is done, and you have resolved any/all conflicts, check in the changes on the branch.