简体   繁体   English

将多个分支合并为一个

[英]Merge multiple branches into one

Can I use git extensions app to merge multiple branches into one. 我可以使用git extensions应用将多个分支合并为一个。 Let's say I have multiple branches, each for a c++ class. 假设我有多个分支,每个分支对应一个c ++类。 I make some modifications to some classes, which means commiting to different branches. 我对某些类进行了一些修改,这意味着提交到不同的分支。 Now a merging will be easy since no conflicts are possible. 现在合并将很容易,因为不可能发生冲突。 How can I reduce the painful job of doing manually all the multiple branches merging with only one command using git extensions (or other way)? 如何减少使用git扩展(或其他方式)仅通过一个命令手动合并所有多个分支的痛苦工作?

普通的旧git merge ,只列出所有分支名称。

This is possible using Git Extensions. 使用Git Extensions可以做到这一点。 Switch to the branch you want to add the other branches to and then bring up the "Merge branches" dialog by using the keyboard shortcut "Ctrl+M". 切换到要添加其他分支的分支,然后使用键盘快捷键“ Ctrl + M”打开“合并分支”对话框。

Next to the dropdown where you can select a branch to fetch changes from there is a button. 在下拉菜单旁边,您可以选择一个分支来从其中获取更改。 Clicking this button will bring up a new window where you can select multiple branches to bring in changes from. 单击此按钮将打开一个新窗口,您可以在其中选择多个分支以引入更改。 The result of this will be that the names of all the selected branches now appear in the dropdown textarea. 这样的结果将是所有选定分支的名称现在出现在下拉文本区域中。

There you go. 妳去 =) =)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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