简体   繁体   中英

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:

团队探索屏幕截图

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

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 (ie 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM