Nota: yo sólo he reescrito esta respuesta con 24 horas más git-fu en mi haber :) En mi historia concha, todo el asunto es ahora tres de una sola línea. Sin embargo, los he descondensado para su conveniencia.
De esta manera, espero que puedan ver cómo hice las cosas, en lugar de tener que copiar/pegar cosas a ciegas.
Aquí está paso por paso.
Supongamos que es fuente en ~/OLDREPO que contiene depósitos. Crear un clon de ensayo que contiene no stashes:
cd ~/OLDREPO
git clone . /tmp/TEST
empujar todas las stashes como ramas temporales:
git send-pack /tmp/TEST $(for sha in $(git rev-list -g stash); \
do echo $sha:refs/heads/stash_$sha; done)
bucle en el extremo receptor de transformar de nuevo en stashes:
cd /tmp/TEST/
for a in $(git rev-list --no-walk --glob='refs/heads/stash_*');
do
git checkout $a &&
git reset HEAD^ &&
git stash save "$(git log --format='%s' -1 [email protected]{1})"
done
limpieza de su ramas temporales si lo va a
git branch -D $(git branch|cut -c3-|grep ^stash_)
Haz una lista git escondite y usted será algo como esto:
[email protected]{0}: On (no branch): On testing: openmp import
[email protected]{1}: On (no branch): On testing: zfsrc
[email protected]{2}: On (no branch): WIP on sehe: 7006283 fixed wrong path to binary in debianized init script (reported as part of issue
[email protected]{3}: On (no branch): WIP on debian-collab: c5c8037 zfs_pool_alert should be installed by default
[email protected]{4}: On (no branch): WIP on xattrs: 3972694 removed braindead leftover -O0 flag
[email protected]{5}: On (no branch): WIP on testing: 3972694 removed braindead leftover -O0 flag
[email protected]{6}: On (no branch): WIP on testing: db9f77e fuse_unmount_all could be starved for the mtx lock
[email protected]{7}: On (no branch): WIP on xattrs: db9f77e fuse_unmount_all could be starved for the mtx lock
[email protected]{8}: On (no branch): WIP on testing: 28716d4 fixed implicit declaration of stat64
[email protected]{9}: On (no branch): WIP on emmanuel: bee6660 avoid unrelated changes
En el repositorio original, la misma parecía
[email protected]{0}: WIP on emmanuel: bee6660 avoid unrelated changes
[email protected]{1}: WIP on testing: 28716d4 fixed implicit declaration of stat64
[email protected]{2}: WIP on xattrs: db9f77e fuse_unmount_all could be starved for the mtx lock
[email protected]{3}: WIP on testing: db9f77e fuse_unmount_all could be starved for the mtx lock
[email protected]{4}: WIP on testing: 3972694 removed braindead leftover -O0 flag
[email protected]{5}: WIP on xattrs: 3972694 removed braindead leftover -O0 flag
st[email protected]{6}: WIP on debian-collab: c5c8037 zfs_pool_alert should be installed by default
[email protected]{7}: WIP on sehe: 7006283 fixed wrong path to binary in debianized init script (reported as part of issue #57)
[email protected]{8}: On testing: zfsrc
[email protected]{9}: On testing: openmp import
Puedes buscar el último escondite de un control remoto git, pero no en tu escondite, solo en otra referencia. Algo así como 'git fetch some-remote + refs/stash: refs/remotes/some-remote/stash' el' git stash apply some-remote/stash'. Pero no se pueden acumular depósitos porque están almacenados en el reflog, que no es extraíble. Ver http://stackoverflow.com/questions/2248680/can-i-fetch-a-stash-from-a-remote-repo-into-a-local-branch/29839687#answer-29839687 – sj26