I've run into this issue before, thought nothing of it too much, but it is getting quite tedious.
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.
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:
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!
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
.
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".
(For this case change Main branch to Main123 branch)
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.