Sia merge che rebase integrano i cambiamenti da un ramo a un altro, ma lo fanno diversamente: merge preserva la cronologia con un commit di merge, mentre rebase riscrive la cronologia per creare una sequenza lineare. Comprendere la differenza e quando usare ciascuno è importante.
Merge — preserva la cronologia (combina)
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)
