Git lab

Git graph

Type real Git commands and watch commits, branches and HEAD move on a live commit graph.

InteractiveFast-forward, then a merge commit
Loading interactive…

The first merge prints Fast-forward and creates nothing: main was an ancestor of feature/cart. After main gains its own commit the histories diverge, so the second merge records a merge commit whose first parent is main's old tip. Try git merge --no-ff on a fresh branch to force a merge commit anyway.

Learn the concept

The lessons this lab comes from, with the explanation, a practice task and a quiz.

More labs

All labs