Rails 3.1 Can a deleted folder be restored with git?

OK I deleted the precompiled assets in my public / assets folder. I accidentally deleted the entire folder in which I was there. I checked the repository and started webrick, and the files seem to be loading, although when I look in the directory they are not there? How to restore or move these files to the public / assets directory?

+6
source share
1 answer

If you did not complete the deletion. Check the changes that are expected with git status and use git checkout to restore the file to its last state (HEAD):

git checkout -- file_path

Git works with files that are not in directories.

+12
source

Source: https://habr.com/ru/post/901061/


All Articles