Git TutorialLesson 14Free preview
Git Merge
This lesson is part of Git · All levels
Summary
Merge combines changes from one branch to another active branch. If the target can move forward without making a combined commit, Git does fast-forward; if both branches are simultaneously growing, a three-way commit merges. When the same line is changed in both branches, Git marks the conflict to be manually resolved.
Key points
- When you're at the destination branch, run git merge
- Fast-forward occurs when a target can move forward without a joint commit
- The --no-ff option always makes commit merge so the branching history is visible.
- Conflict marked blocks <<<<<<< and ======= which must be resolved manually
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.