简体   繁体   English

如何在Visual Studio团队资源管理器中一次性接受多个文件中的Git分支合并更改?

[英]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团队资源管理器中撤消合并并使用Gi​​t命令行。

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.

相关问题 在Team Explorer中为Visual Studio 2013选择GIT MERGE的选项在哪里? - Where is the option to do a GIT MERGE in Team Explorer for Visual Studio 2013? 在git merge期间,在合并冲突的情况下,如何接受来自某个分支的所有更改? - During git merge, in the case of merge conflict, how do I accept all changes from a certain branch? 为什么 Visual Studio 2019 Team Explorer 中的 Git rebase 会报告对相距很远的行的更改发生合并冲突? - Why does Git rebase in Visual Studio 2019 Team Explorer report a merge conflict for changes to lines that are far apart? 如何使用git在Visual Studio Team Explorer中撤消凉亭更改? - How do I undo a bower change in Visual Studio Team Explorer using git? git - Visual Studio 团队资源管理器显示的更改实际上并不存在 - git - Visual studio team explorer is showing changes that are not actually there 是否可以恢复在 Visual Studio -> Team Explorer -> Git 中所做的撤消更改? - Is it possible to revert the undo changes done in Visual Studio -> Team Explorer -> Git? 如何在一个git commit中将master分支的更改合并到我的side project分支中? - How do I merge a master branch's changes into my side project branch in one git commit? Visual Studio:Git 团队资源管理器未显示任何更改 - Visual Studio: Git Team Explorer does not show any changes Visual Studio 如何在团队资源管理器中打开文件而不是差异窗口更改 git - Visual studio how to open file and not diff window in team explorer changes git Visual Studio Team Explorer-GIT:自动忽略新文件 - Visual Studio Team Explorer - GIT: Automatically ignoring new files
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM