I deleted my db folder in a rails application in with git rm -r
I've tried
git reset HEAD
and
git reset --hard HEAD
but the migration files arent coming back. I tried commiting, then running the reset and still nothing.
What should I do?
I deleted my db folder in a rails application in with git rm -r
I've tried
git reset HEAD
and
git reset --hard HEAD
but the migration files arent coming back. I tried commiting, then running the reset and still nothing.
What should I do?
You can checkout individual files from your last commit or index.
you may be able to salvage most of your stuff that way
read more:
git help checkout
You can checkout the file from the commit where it still exists. Here's how to do it.
Try
git reset --hard HEAD^1
(the commit just before HEAD). Or you can get the hash of a previous known working commit withgit log
, thengit reset --hard <hash>
.