You need changes from a teammate's branch in your feature branch. How would you bring them in?

When you need another developer's in-progress work while on your own feature branch, git merge lets you pull their branch's commits directly into yours, combining both sets of changes.

Key Points

Example

While building a checkout page that depends on a new pricing API a teammate is writing on branch feature/pricing-api, you run git checkout feature/checkout and then git merge feature/pricing-api to bring their work into yours.

git pull
git checkout feature/checkout
git merge feature/pricing-api

Interview Tip

A concise interview answer is

I'd make sure my local repo is up to date with git pull, switch to my feature branch, and run git merge with the name of the other branch to bring those changes in. If there are conflicts, I resolve them before continuing my own work.

Last updated: 11 November 2026

Previous question: What does the git pull command do?

Next question: You made a mistake in an earlier commit. How do you fix it with Git?

More Git - Level II interview questions

All Git - Level II questions