Somehow I have a really large local repository because I added over 2 GB of files by accident and without thinking tried to push this. I aborted, removed the files and did a recommit, but when I try to git push origin master
to Bitbucket, it fails with:
fatal: The remote end hung up unexpectedly
My .git file is still huge, even though I have since long removed the unneeded files. Since the push is over 2 GB, Bitbucket says I need to set the http.postBuffer
to a higher number. I've done this many times but after about 15 tries I want to just start over.
git status
gives me this:
On branch master
Your branch is ahead of 'origin/master' by 4 commits.
(use "git push" to publish your local commits)
But since the push never works, how do I fix it? Worst case scenario I could just blast the repo and rebuild it, but I'd like to know if there is a way to reset the push since it keeps failing.