WEEK 7 · LESSON 7 · TOPIC 2 OF 11 · How It Works

How It Works

Lesson progress

0% Complete

SECTION 1 OF 1

In this topic · 1 sections
  1. Overview

Overview

To merge main into development, first switch to development:

git checkout development

Then merge main:

git merge main

Development now includes its own commits plus the relevant changes from main.

To bring development into main, switch to main and merge development:

git checkout main
git merge development

The branch named after git merge is the source of incoming changes. The current branch is the destination that receives them.

This current-branch rule is essential. The same command name produces a different result depending on which branch is checked out.