Fast Forward Merge
When main has not moved, merging a branch just moves the pointer forward.
Example
echo one > a.txt && git add a.txt && git commit -qm 'first'
git switch -q -c feat
echo f > f.txt && git add f.txt && git commit -qm 'feat'
git switch -q main
git merge feat | head -n 2 | tail -n 1
git log --format=%sResult
Fast-forward feat first
Exercise
Merge a branch.
git feat
Quiz Test
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.