git stash salva temporaneamente le tue modifiche non committate e ripristina la tua directory di lavoro a uno stato pulito — così puoi cambiare contesto (ad es. correggere un bug urgente su un altro branch) senza committare lavoro non finito, e poi ripristinare le modifiche in seguito.
Il problema che stash risolve
You're mid-work with uncommitted changes, but need to switch context urgently:
→ switch branches? Git may refuse (uncommitted changes would conflict) or carry
them along messily
→ commit half-done work? No — it's not ready (pollutes history)
→ STASH saves your changes aside, giving you a clean working directory to switch.
