TFS合并问题,缺少新文件 [英] TFS Merge Issue with Missing New Files

查看:60
本文介绍了TFS合并问题,缺少新文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我以前曾遇到过这个问题,对此没什么想太多,但它变得非常乏味.

I've run into this issue before, thought nothing of it too much, but it is getting quite tedious.

我们有以下内容.一个主要分支,即我们的用户正在使用的稳定版本.我们有一个开发分支,其中包含我们的修补程序,我们可以立即发布这些修补程序.然后,我们有了功能分支,这些分支具有WIP的功能.为简单起见,我将只继续讨论后两个-开发和一个名为报价"的功能分支.

We have the following. A main branch, which is the stable release that our users are using. We have a development branch, which hosts our fixes that we can release at a moments notice. Then we have our features branches, which have the features that are WIP. For simplicity, I will only go on about the latter two - Development, and a feature branch named Quoting.

Quoting分支的功能已完成.它已经将开发分支合并到其中,并且所有冲突都已在报价分支中得到解决.现在,我们在报价部门拥有最新的信息,而在开发部门拥有最新的工作.总而言之,仅更改了20到30个文件.

The Quoting branch has had it's feature finished. It's had the development branch merged into it and all the conflicts have been resolved on the quoting branch. Now, we have the latest on the quoting branch, and the latest work on the development branch. All in all, there's only something like 20-30 files changed.

因此,我将要合并回开发分支,然后按照提示进行操作-非常简单:

So I'm about to merge back into the development branch, and I follow the prompts - pretty straightforward:

现在这是我遇到障碍的地方.我得到了包含的更改列表,这些列表的数量远远超过30;几乎每个文件都被合并了!

Now here is where I hit a bit of a roadblock. I get a list of included changes that counts well above 30; nearly every single file is being merged!

因此,我遵循了StackOverflow 帖子,该帖子建议右键单击并撤消更改,但在屏幕上按No To All.确认对话框会有所帮助.不幸的是,我跳过了This works when you only have changes to files. It will not merge any NEW files that you have added的评论.

So I followed a StackOverflow post that suggested that right-clicking and undoing changes, but pressing No To All on the confirmation dialog would help. Unfortunately, I skipped the comments that said This works when you only have changes to files. It will not merge any NEW files that you have added.

所以我的问题是,我该如何获取所有实际的未决更改,而不必逐项检查并排除我所做的工作,因此我可以撤消未决的更改并重新包括我的更改,简单地进行合并?这可能是由于我根据StackOverflow和Web上的一些注释重命名了分支的事实造成的,即使层次结构都相同吗?

So my question is, how do I go about getting all the actual pending changes, without having to go through item by item and excluding what I've worked on, so I can undo the pending changes and re-include my changes, to simply do a merge? Could this all be caused by the fact I renamed the branch as per some comments on StackOverflow and the web, even though the hierarchy is all the same?

推荐答案

实际上,这是由重命名的分支引起的.当您在源代码管理中重命名分支时,它将删除上一个分支并创建一个新分支.即使层次结构都相同,但分支的位置却不同.您可以通过在源代码管理中显示已删除的项目"来查看您的旧分支.

In fact, this is caused by the renamed branch. When you Rename a branch in Source Control, it will delete the previous one and create a new one. Even though the hierarchy is all the same , but the branch is tollay different. You can view your old branch by "show deleted items in Source Control".

(在这种情况下,将Main分支更改为Main123分支)

For this case change Main branch to Main123 branch

因此在TFS中,它为未更改的文件显示[合并]状态,为实际更改的文件显示[合并,编辑]状态,并为新的添加项目显示[合并分支].

So in TFS, it shows [merge] status for the unchanged file and shows[merge,edit]status for the files that actually changed and shows[merge branch] for the new add item.

对于您的情况,没有更好的方法可以简单地进行合并. 此外,强烈建议您不要直接重命名分支,除非确实有必要.它还会弄乱您的变更集历史记录.您最好创建具有​​完整历史记录的新分支.

For your situation, there is no better way which you can simply do a merge. Moreover, strongly suggest you don’t rename the branch directly, unless this is really necessary. It would also mess up your changeset history.You would be best creating a new branch with in tact history.

这篇关于TFS合并问题,缺少新文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆