WEEK 7 · LESSON 7 · TOPIC 7 OF 11 · Practical Application

Practical Application

Lesson progress

0% Complete

SECTION 1 OF 1

In this topic · 1 sections
  1. Overview

Overview

A safe merge sequence is:

  1. Commit or preserve current work.
  2. Switch to the branch that should receive changes.
  3. Run git status and confirm the working tree is clean.
  4. Run git merge <source-branch>.
  5. If the merge succeeds, inspect the combined files.
  6. If a conflict occurs, open each conflicted file.
  7. Choose or construct the final intended content.
  8. Remove conflict markers.
  9. Stage the resolved files.
  10. Commit the resolution.

Example: synchronize development with main, then merge development into main.

git checkout development
git merge main

Review and test the combined development branch. Then:

git checkout main
git merge development

This order allows development to absorb the latest main changes before main receives the completed development work.