how to recover deleted folder code example
Example 1: git recover deleted file
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
Example 2: restore deleted repo
Restoring a deleted repository that was owned by a user account
In the upper-right corner of any page, click your profile photo, then click Settings.
In the left sidebar, click Repositories.
Under "Repositories", click Deleted repositories.
Next to the repository you want to restore, click Restore.
Note:It may take up to an hour for repositories to be displayed here.
You can only restore repositories that have no forks or have not been forked. Learn more