Oba merge i rebase integriraju promjene iz jedne grane u drugu, ali to čine različito: merge čuva historiju s merge commit-om, dok rebase prepisuje historiju da bi se stvorila linearna sekvenca. Razumijevanje razlike i kada koristiti svaki je važno.
Merge — čuva historiju (kombinira)
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)
