Git合并两个本地分支 [英] Git merge two local branches

查看:120
本文介绍了Git合并两个本地分支的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有分支 Master branchA branchB .现在,我正在 branchA 中工作,我需要将 branchA branchB 合并,然后在 branchA .所有文件都放在 branchA branchB 中.

I have branch Master, branchA and branchB. Now I'm working in the branchA and I need to merge branchA with branchB and proceed my work in the branchA. All files are comitted in the branchA and branchB.

实现它的快速方法是什么?

What's the fast way to implement it?

推荐答案

如果我理解您的问题,则希望将 branchB 合并到 branchA 中.为此,

If I understood your question, you want to merge branchB into branchA. To do so,

第一次结帐 branchA 如下,

git checkout branchA

然后执行以下命令,将 branchB 合并到 branchA 中:

Then execute the below command to merge branchB into branchA:

git merge branchB

这篇关于Git合并两个本地分支的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆