How to update feature branch in Git


When working on a source code that has multiple contributors, it can be so that the feature branch that you are currently working on is behind by a few commits. This can happen when someone else on the team merges their commits to the main branch while you are working on the feature branch. To bring in the latest commits to your feature branch, you will need to either rebase to the main branch or merge the local main branch to your feature branch after pulling in the latest commits from the remote main branch.


Bharghava Varun Ayada is a Staff Software Engineer at Walmart Labs, living in Bangalore, India. This blog is about software engineering, system design, distributed systems and DevOps.

Github / Twitter / LinkedIn / / Stackoverflow

Recommended Books
Designing Data-Intensive Applications / Staff Engineer / Building Microservices / Site Reliability Engineering

Get new posts by email