3

I want to include a PDF file in the repo, which is currently 797K in size.

But git push hangs after:

Writing objects 100%
Total 25

It freezes after x-git-receive-pack-result

I have tried setting http.postBuffer to 524288000 but that doesn't work either.

Yan King Yin
  • 1,189
  • 1
  • 10
  • 25

2 Answers2

1

It's not recommended to place binary files inside git, but since sometimes we do have to do it just make sure to reduce the size before adding your file to the repo.

Use this site for example:
http://smallpdf.com/compress-pdf

CodeWizard
  • 128,036
  • 21
  • 144
  • 167
0

Depending on your server used by the git repo hosting remote side, you might be limited by said server (NGiNX client max_body_size, Apache LimitRequestBody). While your pdf is small, it might be part of a larger (too large) commit.

If you can, you can use a bundle, to copy it over to the server (if you have access to said server): see "Git push hangs for a large repository"

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • I'm using GitHub, public. – Yan King Yin Jan 17 '16 at 09:56
  • 1
    @YanKingYin then maybe your GitHub repo is too bug, or there is some kind of temporary communication issue between you and GitHub. To test it, make a test repo with just your pdf in it, and try to push it to a new GitHub *empty* repo. If that fails too, the communication issue would be confirmed. – VonC Jan 17 '16 at 10:36