martes, 25 de noviembre de 2014

Git checkout all deleted files

So the scenario is I removed a bunch files temporarily or by mistake and now I want them back. Instead of going manually one by one with git status, just run

git status | grep deleted | cut -f5 -d' ' | xargs git checkout

This can be used to do many more things like deal with untracked files and other type of problems.

No hay comentarios:

Publicar un comentario