Revert Deleted File From Commit

02 Jan 2014

Some day you use 'git rm file' to delete some files in your local repository and commit this change. To recover these removed files, you can do:

git reset HEAD //back your status to last 'to be commit'
git checkout file // recover deleted files
git reflog //check logs

'ls' your repository and find removed files are back.

comments powered by Disqus