Git Merge Fast-forward
Predict Output Medium
Question
What does this code print?
Code
git checkout main
git merge feature
# Fast-forward
Hint
Fast-forward moves the pointer without a merge commit.
Explanation
If main has not diverged from feature, Git does a fast-forward merge — it simply moves the main pointer forward to the feature commit. No merge commit is created. Use --no-ff to force a merge commit even when fast-forward is possible.
Related Resources
Related Lessons
- Git Merge
Learn git merge.
Look up unfamiliar terms
A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.