I accidentally deleted all the project files and now I want to get everything back through a commit. How do I do this?
Git log shows one commit(head). There is no project on GitHub and no local copies either. My only option is this commit.
I accidentally deleted all the project files and now I want to get everything back through a commit. How do I do this?
Git log shows one commit(head). There is no project on GitHub and no local copies either. My only option is this commit.
To restore file, it is better to use the git restore
command:
cd /path/to/repository
git restore -s <commitID> -- .