git stash gemmer midlertidigt dine ikke-committetede ændringer og gendanner din arbejdsmappe til en ren tilstand — så du kan skifte kontekst (f.eks. rette en hastende fejl på en anden branch) uden at committe halvfærdigt arbejde, og derefter gendanne ændringerne senere.
Problemet stash løser
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.
