0

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.

Adrian Mole
  • 49,934
  • 160
  • 51
  • 83

1 Answers1

0

To restore file, it is better to use the git restore command:

cd /path/to/repository
git restore -s <commitID> -- .
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250