When pushing large files up to BitBucket (git in general?) Sourcetree gets stuck on the POST command stating:
POST git-receive-pack (chunked)
It seems to be that Sourcetree’s (or possibly just git’s) ability to “chunk” files and send them is broken.
Note: the exception / error message (1) in the following image is nothing to do with the chunking issue and does not seem to affect pushes in any way; it is simply highlighted here to tell you to ignore it for the purposes of this article.
Here you can see the chunked message (2) in the Sourcetree window:
This is quite a simple one.
Open a git bash window. I tend to use one in the folder of the repo I’m working on by right clicking in the explorer window and choosing “Git Bash” (3)
Now type the following (4) in the git bash window then hit return:
git config http.postBuffer 1000000000
The number can be pretty much anything as long as it’s larger than the size (in bytes) of the thing you’re trying to push. I’m sure there will be some reason why it should be multiples of 1024 or 8k or something of the like but, hey, it works. If you have a better explanation of what this number should be, please leave a comment.
You should now re-push your branch to the remote (even if sourcetree isn’t highlighting the need to push) and all will be good in the world.