Just stumpled over a problem that I wanted to push a large file (400+mb) as part of a commit into our remote-repository but git ended up continuosly pushing 400+mb and then starting over without any progress.
The long story short without knowing what why this fixes the problem:
git config http.version HTTP/1.1
Helpful to get a bit more feedback while pushing prefix the git push-command with GIT_TRACE=1
GIT_TRACE=1 git push --verbose origin main