I\'m trying to push my code into github, but almost everytime I meet this error
error: RPC failed; result=28, HTTP code = 0
fatal: The remote end hung up un
That error code is a timeout error on the client. Although I suspect that the server-side is closing as the message suggests. To try and get more information you could try setting the environment variable GIT_CURL_VERBOSE=1
for your push eg:
GIT_CURL_VERBOSE=1 git push origin
This can give you an indication of whether it is the client timing out or the server disconnecting that is the original error. There are a number of things you might do to ensure that you're not always coming across this error.
Large Repository
For point 2. There are a number of things you can do if you suspect that the pack you are pushing is large objects. This blog post is quite detailed on the subject:
http://blogs.atlassian.com/2014/05/handle-big-repositories-git/
I don't think the http.postBuffer is really a solution here.