Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I accept Git branch merge changes in multiple files in one go in Visual Studio Team Explorer?

I am doing a git branch merge between two branches using Visual Studio Team Explorer for a Git Repo. I have made a decision to 'Keep Target' changes. I have 190 code files to do. At present, it appears I have to go through each file and click 'Keep Taget'. Please see the screen shot below:

Team Explore screen shot

Any ideas how I can do this in a batch? Any script that I can run to do all these files?

like image 519
Julius A Avatar asked Jul 21 '15 10:07

Julius A


1 Answers

Undo the merge in Visual Studio Team Explorer and use the Git command line.

Assuming you're on the master-wg branch, do:

git merge -X ours develop-wg

The -X ours option forces merge conflicts to be auto-resolved by favouring 'our' version (i.e from the branch we're currently checked out on, the branch we're merging into). Changes from the other branch that do not conflict with our branch will also be reflected in the merge result.

like image 174
Steve Avatar answered Sep 30 '22 15:09

Steve