Git + Rails: How to restore files deleted with “git rm -r”?

前端 未结 3 862
耶瑟儿~
耶瑟儿~ 2021-02-05 18:29

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
<         


        
3条回答
  •  伪装坚强ぢ
    2021-02-05 18:48

    Try git reset --hard HEAD^1 (the commit just before HEAD). Or you can get the hash of a previous known working commit with git log, then git reset --hard .

提交回复
热议问题