Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Filter Visual Studio 2013 TFS merge to only files that have actually changed

Tags:

I am doing a merge between two branches and TFS/Visual Studio 2013 is identifying 1800 files required to be merged. However, doing a diff between the two branches shows that there are only ~100 that are actually different.

The pending changes window mostly corroborates this, as all files are listed with a [merge] status except those which have actually changed; those have a [merge, edit] status.

Is there a way to filter the pending changes list to only show files which are really changed so I can do inspect the differences visually? It is very error prone to have to scroll through and manually do this, skipping items that show only [merge].

My current alternative would be to do a diff on the branches, and specifically look in the pending changes window at files which are identified as different, but that is rather cumbersome for something that should be simple.

Edit: Here is a screenshot of the pending changes window. I only care about the items which are [merge,edit] as it means there is a change and I want to see the diff. Conflicts will be shown in the Resolve Conflicts window. I don't care about [merge] items, as they are identical. There are 1000s of files with no changes, but I want to single out the ones that have changed and inspect the diff.

PendingChangesWindow

like image 737
Travis Avatar asked May 15 '14 15:05

Travis


People also ask

How do you merge changes in TFS?

To merge the main branch with the development branch On the Select the source and target branches for the merge operation screen: In Source branch, specify the main branch. In Target branch, specify the development branch. Click Next, and then click Finish. Click AutoMerge or merge the changes manually.


1 Answers

Try the following trick: In Team Explorer, Ctrl+A all the included changes, right click and select Undo...

You'll get the Undo Pending Changes dialog with all the items selected. First of all, uncheck everything. Then observe that you have a column named Change and you can sort by it to have all the [Merge] changes stacked together, and you can check them all together and undo only them with a single click.

like image 59
Eyal Ronel Avatar answered Sep 22 '22 10:09

Eyal Ronel