Unlimited Plugins, WordPress themes, videos & courses! Unlimited asset downloads! From $16.50/m
Lessons:2Length:4 minutes

Next lesson playing in 5 seconds


Free Preview: Git Basics: Merge and Rebase


  • Overview
  • Transcript

Integrating source code changes from one Git branch to another can happen either through a merge or a rebase. Merging preserves the branch history, while rebasing doesn't.

In this Coffee Break Course, instructor Ed Wassermann will explain the difference between merge and rebase. You'll learn when to use one or the other and how they can both be used to roll changes from feature branches back to master.

Why not check out our Introduction to Git and GitHub or watch the other Coffee Break Courses in this series:

1.Git Basics: Merge and Rebase
2 lessons, 03:57

Free Lesson

Git Basics: Merge and Rebase

1. Git Basics: Merge and Rebase

1.1 Introduction

Integrating changes from one branch into another can happen either through a merge or a rebase. A merge preserves the branch history. A rebase doesn't. A merge is useful for combining branches that are already public. A rebase is for combining private branches, never for public ones. What should be communicated clearly to begin. Is the simple fact that both merging and rebasing are about integrating new work. New commits that are on separate branches. That's it. In all of this there will always be at least two branches in play.