git stash guarda temporalmente tus cambios sin hacer commit y revierte tu directorio de trabajo a un estado limpio — para que puedas cambiar de contexto (por ejemplo, arreglar un bug urgente en otra rama) sin hacer commit de trabajo a medio terminar, y luego restaurar los cambios más tarde.
El problema que stash resuelve
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.
