记一次Git push错误

socdeMBP:Project joe$ git push
Counting objects: 357, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (347/347), done.
Writing objects: 100% (357/357), 85.15 MiB | 2.31 MiB/s, done.
Total 357 (delta 64), reused 0 (delta 0)
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly
Everything up-to-date

原因可能是推送文件太大:

在项目的.git 文件下的config文件中加入配置:

[http] postBuffer = 524288000

重新push即可。

.git需要关闭隐藏文件才可以找到

具体命令:

defaults write com.apple.finder AppleShowAllFiles Yes && killall Finder

cd .git

open -e config

添加 [http] postBuffer = 524288000

defaults write com.apple.finder AppleShowAllFiles No && killall Finder

你可能感兴趣的:(记一次Git push错误)