After using the git add command to add files, git reset --hard accidentally deleted some files on the disk, but using git status you can see the files after git add. How to restore the files in the cache? The following is git Content displayed by status
Commit failure means that your changes have not been indexed by git, and recovery is unlikely. Use the git refrog command to try to rescue it.
It feels like you can
git checkout -- xxx
to restore the files you want.Please take a screenshot of your current
git status
output, and explain specifically what you have done before.Use the git fsck command to view the blob file, and then restore it based on the ID number. It is possible to restore it, but if there are many files to add, you have to do it one by one