I'm unable to push my code to a newly created Github repo. I've even reset the upstream branch and deleted some remotes that were unnecessary in my local repository and nothing worked. I want to reset my project but I don't want to run the risk of deleting my entire codebase as there is currently no other backup other than what's on Replit
- I created a new Github repository by connecting to my Github account.
- I pushed the main branch to the repo
- I got the following error:
- Running
"git push -u origin main"
through the shell returns the following error:
Enumerating objects: 3535, done.
Counting objects: 100% (3535/3535), done.
Delta compression using up to 8 threads
Compressing objects: 100% (892/892), done.
Writing objects: 100% (3535/3535), 3.68 MiB | 9.34 MiB/s, done.
Total 3535 (delta 2632), reused 3495 (delta 2618), pack-reused 0 (from 0)
remote: Resolving deltas: 100% (2632/2632), done.
remote: fatal: did not receive expected object 360c8759d0b5c9e5cc679cdba4ce96696a611d26
error: remote unpack failed: index-pack failed
To /[Git Repo].git
! [remote rejected] main -> main (failed)
error: failed to push some refs to '/[Git Repo].git'