git push hangs forever after writing objects… why?
Mar 15, 2023
Quick memo.
I’ve been working on my new portfolio.
And I was going to push codes to the repository, but for some reason, it prevented pushing my code, it hangs forever here—
macbook-pro:portfolio_new yukinagano$ git push
Enumerating objects: 28, done.
Counting objects: 100% (28/28), done.
Delta compression using up to 4 threads
Compressing objects: 100% (27/27), done.
Writing objects: 100% (27/27), 8.15 MiB | 28.00 MiB/s, done.
Total 27 (delta 2), reused 0 (delta 0), pack-reused 0.
…Hello🤔?
Straight to the point, it was because of the git buffer size.
I was trying to push a big chunk of codes and assets.
Running this command and pushing again solved the issue. Yay.
git config --global http.postBuffer 157286400
A tiny thing, but learned something new :)
Thank you to https://stackoverflow.com/questions/15843937/git-push-hangs-after-total-line
👋