Tsallaka zuwa abun ciki
Justice Tech School

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=%s

Result

Fast-forward
feat
first

Exercise

Merge a branch.

git  feat

Quiz Test

When is a merge a fast forward?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.