Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git push stuck after total when using terminal?

Tags:

git

github

I try to push some file to Github and total size is only 22.2M. I don't know why it stuck after the total line. I've read the Git push hangs when pushing to Github? and tried each answer but it doesn't work at all. Does it works fine? Do I have any method to accelerate this process?

Counting objects: 203, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (176/176), done.
Writing objects: 100% (203/203), 22.12 MiB | 15.70 MiB/s, done.
Total 203 (delta 23), reused 0 (delta 0)
like image 320
Coding_Rabbit Avatar asked May 06 '26 21:05

Coding_Rabbit


1 Answers

I encountered the same issue on one of my repos when trying to push a number of larger commits at once. Multiple attempts wouldn't proceed past the Total output row. I first tried a couple of things suggested in other questions:

  • Increasing the http buffer size, git config --global http.postBuffer 150000000 (~150MB)
  • Waiting 8 hours in case of issues at Github's server

Neither seemed to help. Git push still wouldn't get past the 'Total' line in the terminal, no matter how long I waited.

Solution: After taking a precautionary backup, I issued the garbage collection command to the repo:

git gc

The next git push then worked immediately.

like image 172
jt_uk Avatar answered May 08 '26 16:05

jt_uk



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!