Both merge and rebase jintegraw l-bidliet minn branch wieħed għal ieħor, iżda jagħmlu dan b'modi differenti: merge jippreserva l-istorja b'merge commit, filwaqt li rebase jikteb mill-ġdid l-istorja biex jinħoloq sekwenza lineari. Il-fehim tad-differenza u meta tużża kull waħda huwa importanti.
Merge — jippreserva l-istorja (jgħaqqad)
main: A───B───C───────M ← M is a MERGE COMMIT (two parents)
\ /
feature: D───E
→ git merge feature: creates M combining the branches
✓ Preserves the actual history (shows the branch existed, when it merged)
✗ History has merge commits (can look cluttered with many merges)
