Question : how to recover deleted files from github
Answered by : yellowed-yacare-zo9blsr68lvl
$ git reset --hard HEAD~1
Source : https://devconnected.com/how-to-undo-last-git-commit/ | Last Update : Sun, 19 Jul 20
Question : git recover deleted file
Answered by : sophie-2v0blf03qytv
rm -rf deleted file, if there is any commit before use git commands:
// 1 Find out which comit has the copy of deleted file
git log
// 2 Use checkout to locate which comit what file location
git checkout branch-number-here -- file/location/in/folder/without/quote
example: git checkout 476c714 -- mvc/public/js/bundle.js
Source : | Last Update : Thu, 23 Jul 20