Git Journeymerge visualizer

Git Merge Strategies

Pick a strategy, then step through what git does under the hood.

Step 1 of 5

Initial main branch

Two commits on main

featuremaina1b2c3dAb4c5d6eBc7d8e9fCd0e1f2aDc7d8e9fCd0e1f2aDHEAD← main, feature✓ linear history — no merge commit

COMMAND

$ git commit -m 'A: init'
$ git commit -m 'B: add nav'

WHAT HAPPENED

main has two commits. Fast-forward is only possible when main does not receive new commits while you work on feature.
main branch
feature branch
merge / squash / cherry-pick result
rebased commits