git stash slaat je uncommitted changes tijdelijk op en zet je working directory terug naar een schone staat — zodat je context kunt wisselen (bijv. een urgente bug op een ander branch fixen) zonder half-af werk te committen, en de changes later kunt herstellen.
Het probleem dat stash oplost
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.
