[英]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. 我正在使用Visual Studio Team Explorer为Git Repo在两个分支之间进行git分支合并。 I have made a decision to 'Keep Target' changes. 我已决定“保持目标”的变化。 I have 190 code files to do. 我有190个代码文件要做。 At present, it appears I have to go through each file and click 'Keep Taget'. 目前,似乎我必须浏览每个文件并单击“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. 在Visual Studio团队资源管理器中撤消合并并使用Git命令行。
Assuming you're on the master-wg
branch, do: 假设您在master-wg
分支上,请执行以下操作:
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). -X ours
选项强制合并冲突通过支持'我们'版本(即从我们当前检出的分支,我们正在合并的分支)自动解决。 Changes from the other branch that do not conflict with our branch will also be reflected in the merge result. 来自与我们的分支不冲突的其他分支的更改也将反映在合并结果中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.