Skip to content

Instantly share code, notes, and snippets.

@vernko
vernko / Update-feature-branch-with-master.md
Last active November 6, 2023 18:57
Bring your feature branch up to date with the master branch

The point of this gist is to give you helpful info on some ways that you can update a feature branch you are working on to the current master/main, if you get behind master/main branch. The idea behind this is that when you try to merge your branch you have (hopefully) have less merge conflicts. The two ways I'll outline here are done via the following:

  • Fast Forward Merging
  • Rebasing

Using Fast Forward Merging

This is the way most devs learn how to merge the current master/main branch into your working branch.

First you need to make sure your local master/main branch is up to date. Go to your local project and check out the branch you want to merge into (your local master/main branch)