0

While pushing my repo to Heroku I ran a git pull command and it accidentally deleted my local repo. I understand that these files are just stored as objects in .git but whenever I run

git checkout .

I get this error

error: unable to read sha1 file of <file_name> (7caddd272623f5c80b13bcc584418d803e318a19)

Any help would be appreciated

Daniel
  • 54
  • 1
  • 3
  • 1
    Deleting the repository wrecks it; you'll need to clone a fresh one. (The latest Git release has a "repair" mode for `git fetch`, so if you can install Git 2.36 you can use that instead, but it won't really make much difference here.) – torek Apr 20 '22 at 13:10
  • The title says "files deleted from local repo" but the question says "`git pull` accidentally deleted my local repo". I assume the title is correct and the local repo was not deleted? – TTT Apr 20 '22 at 14:23

0 Answers0