git stash salvează temporar modificările tale necommit-ate și revine directorul de lucru la o stare curată — pentru a putea comuta contexte (de ex. a repara o eroare urgentă pe o altă ramură) fără a commita munca pe jumătate, apoi restaurezi modificările mai târziu.
Problema pe care stash o rezolvă
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.
