Rails 3.1 ¿Puedo recuperar la carpeta eliminada con git?

OK. I was deleting precompiled assets in my public/assets folder. I accidentally deleted an entire folder I had in there as well. I checked out a repository and started webrick and the files seem to be loading, although when I look in the directory they aren't there? how do i restore/move those files back into the public/assets directory?

preguntado el 08 de noviembre de 11 a las 19:11

1 Respuestas

If you haven't commited the deletion. Check the changes that are pending with git status y use git checkout to restore a file to its last commited state ( HEAD ):

git checkout -- file_path

Git works on files not on directories.

respondido 09 nov., 11:01

Actually, I just did : " git checkout -- ./ " after a careless rm, and it restored everything - xShirase

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.