合并一个远程分支到另一个本地分支 [英] Merge a remote branch into another local branch
本文介绍了合并一个远程分支到另一个本地分支的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这可能是一个重复的问题,但是我不知道该如何解决.我正在尝试合并一个远程分支,说 remoteBranch
,它不是我的本地分支 localBranch
的主分支.
This might be a duplicate question, but I couldn't figure out how can I go about it. I'm trying to merge a remote branch say remoteBranch
which is not a master branch to my local branch localBranch
.
我的一位开发人员在远程分支 remoteBranch
上为api端点添加了新分支.作为前端开发人员,我需要获取该分支并将其与本地开发分支 localBranch
合并,以利用该api端点.我怎样才能做到这一点?
One of my developer added a new branch for an api end point on remote branch remoteBranch
. As a frontend developer, I need to fetch that branch and merge it with my local development branch localBranch
to make use of that api end point. How can I do this?
推荐答案
简单地将其合并.
git fetch
git checkout localBranch
git merge remoteBranch
这篇关于合并一个远程分支到另一个本地分支的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文