Reputation: 682
I am having big problems trying to push my code to my bitbucket server. My push is stuck on:
Enumerating objects: 536, done.
Counting objects: 100% (536/536), done.
Delta compression using up to 12 threads
Compressing objects: 100% (209/209), done.
Writing objects: 82% (242/295), 5.05 MiB | 236.00 KiB/s
The "Writing objects" has gotten over 2GB and then crashed with error:
I have tried git config --global http.postBuffer 524288000
. I have read over a few articles and worked through guides:
https://confluence.atlassian.com/stashkb/git-push-fails-fatal-the-remote-end-hung-up-unexpectedly-282988530.html
along with reading various StackOverflow questions to no avail.
I ran the command git diff --stat --cached origin/
and it returns the following:
I have been working on this for days and really don't know what to do as I can't get my code pushed live to get to my staging server.
Upvotes: 0
Views: 2701
Reputation: 488193
You must have accidentally committed some huge file (e.g., a bootleg copy of The Fifth Element as a 4.7 GB DVD image) and then removed that file from subsequent commits.
Using git diff
is no help here—at least, not without a lot of care. Imagine you had three phases in your life: when you were 12, you were 40 kg, then somehow you ballooned to 200 kg during your college years, after which you lost most of that and are back to a more sensible 75 kg. Now, compare a photo of yourself when you were 12, to a photo of yourself today. What do you see? git diff
effectively works by picking two snapshots—two photos of your source files—and comparing just those two photos. It completely skips over all the intermediate snapshots.
Git, however, doesn't skip all the intermediate snapshots: each of those is a commit. If you have a commit with a big file in it, the commit remains in the history, which is nothing more or less than the set of commits in the repository, even if you have subsequently slimmed down all the new commits.
You need to find the commits that contain the large files, and discard them and all subsequent commits in favor of new and improved commits that lack the large files. See How to remove/delete a large file from commit history in Git repository? and related questions.
Upvotes: 1
Reputation: 107
Like described in the attlassian support your repository has a hard cap of 2GB and prevents you from pushing when your above this limit.
A repository is meant to store source code mainly, why is your repo that big?
Upvotes: 2