Por Anónimo (no verificado) , 29 Abril 2026

Más allá de git stash pop

Stash es más capaz que el simple save/pop que sueles ver. Bien usado, es un cuaderno personal para cambios de contexto que vence al hacer commit de WIP en la branch.

Guardar con intención

git stash push -m "WIP: refactor parser"
git stash push -m "ajustes config" -- src/config/
git stash push -k -m "sin staged"
git stash push -u -m "incluir untracked"
git stash push -a -m "incluir ignorados"

Listar e inspeccionar

git stash list
git stash show stash@{2}
git stash show -p stash@{2}
git diff stash@{0}^1 stash@{0}

Apply, pop, branch

git stash apply
git stash pop
git stash apply stash@{3}
git stash branch fix-bug stash@{1}

Stash parcial

git stash push -p

Resolución de conflictos

git stash apply
git stash pop --index

Limpieza

git stash drop stash@{4}
git stash clear
git reflog show stash

Caso de uso: rebuild antes de review

git stash push -u -m "feature WIP"
git checkout main && git pull
git switch -c ci-fix
# arreglar + commit + push
git checkout feature
git stash pop

Errores comunes

Hacer stash con archivos untracked pero sin -u. Tratar el stash como almacenamiento a largo plazo.