If you are working with large repositories or commits containing large files, the git push command may fail because the default buffer (1 MB) is too small.
git config --global http.postBuffer 524288000