FAQ about Git in SourceCraft

How do I get started with Git?

For a detailed Git tutorial, see Getting started with Git.

Errors in Git when attempting to send a large file over HTTPS

Attempting to send a large file via Git over HTTPS may cause the following errors:

  • send-pack: protocol error: bad band #XXX: Protocol error while sending data. The server received an invalid packet due to a buffer overflow.
  • send-pack: unexpected disconnect while reading sideband packet: Unexpected connection break while reading a sideband packet.
  • fatal: the remote end hung up unexpectedly: The remote server forcibly closed the connection without waiting for the data transfer to complete.
  • error: RPC failed; HTTP 500 curl 22 The requested URL returned error: 500: The server returned HTTP codeĀ 500 (internal error) while processing an RPC request with a large body.

To avoid this, increase the buffer for HTTP POST requests in the Git configuration by running this command:

git config http.postBuffer 524288000

Tip

To store large files in a repository, we recommend using Git Large File Storage (LFS).