Unable to commit to the GitHub repository

Problem description:

  • I am facing problem while pushing the code to GitHub repository.
  • When I push commits through replit built-in git feature it show error on screen “The push was rejected by the remote. This is usually because the remote has commits that aren’t in the local repository.”

Expected behavior:

It should push code and success message

Actual behavior:

Steps to reproduce:

  • Open any repl .
  • initialise git repo using sidebar.
  • commit repo.
  • Set upstream origin
  • push changes.
  • there you’ll show that error

Browser: Application
OS: Android 10
Device (Android, iOS, NA leave blank): Android
Plan (Free, Replit Core):

Welcome to Replit Ask! Could you try run git push in the Shell and send the output of that (or at least the error)? The Git pane isn’t useful when trying to debug a Git error.

1 Like

I have the same problem and tried git push but it don’t works.

~/meetup-test-GitHub-Vercel$ git push
fatal: The current branch main has no upstream branch.
To push the current branch and set the remote as upstream, use

    git push --set-upstream origin main

~/meetup-test-GitHub-Vercel$ git push --set-upstream origin main
Enumerating objects: 15634, done.
Counting objects: 100% (15634/15634), done.
Delta compression using up to 8 threads
error: pack-objects died of signal 976)
error: pack-objects died of signal 9
fatal: the remote end hung up unexpectedly
send-pack: unexpected disconnect while reading sideband packet
fatal: the remote end hung up unexpectedly
error: failed to push some refs to 'https://github.com/.../...'

Could you try running it again? Looks like it had a network error.

thank you for your answer.
I tried it again but it also don’t work.
i will test du push a other repl to GitHub maybe this will work

Hmm. Perhaps git is using too much memory, and Replit is killing it?

1 Like

i also got the same issue. heres the error from shell