git fatal: the remote end hung up unexpectedly
I’m developing a new feature and it use an external framework. I have to replace the xcframework with new one whenever release.
I pushed it to branch first time. However soon I realized something was wrong. So I modified the commit and tried to push it force.
But the terminal emit this error.
Actually I use only Xcode and VSCode, therefore I should use terminal to force push, and I found this error is raised only on Terminal.
I googled about this issue and found a solution. It’s git buffer size setting. Maybe the reason was the larget size of the framework.
So I modified .gitconfig and set postBuffer to fix it.
[http]
postBuffer = 524288000
If you don’t want change the config file. use this command
git config — global http.postBuffer 524288000
Conclusion
If you encounter this error,
git fatal: the remote end hung up unexpectedly
check if you commit large file or directory, and increase the buffer size using configuration setting.
Happy coding :)
If you found any helpful from this post, please give it a round of applause 👏. Explore more content in my other posts.