user1012181 user1012181 - 8 months ago 42
Git Question

Merge a remote branch into another local branch

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
.

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?

Answer Source

Simply merge it.

git fetch
git checkout localBranch
git merge remoteBranch
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download