Although I am using a wired connection, I recently got an error message when trying to git push a new project initially to a private GitHub repository:
$ Write failed: Broken pipe $ fatal: The remote end hung up unexpectedly
Apparently, there were already some big files like PDFs, high resolution images and a database backup in the project.
Instead of picking out these huge files manually, this hint https://stackoverflow.com/a/54238315 was helpful, whatever magic that might be ^^:
$ git gc --aggressive --prune