2

New git user here.

I used to be able to run 'git push' commands but it just stopped working all of a sudden.

$ git push origin master
Enumerating objects: 29, done.
fatal: the remote end hung up unexpectedly
fatal: the remote end hung up unexpectedly
fatal: the remote end hung up unexpectedly
error: failed to push some refs to 'https://<user_name>@bitbucket.org/<user_name>/<file_name>.git'

I already updated Git for Windows

$ git --version
git version 2.19.1.windows.1

I already tried 'git pull' before add, commit and push

$ git pull
Already up to date.

I already tried a bigger buffer

$ git config http.postBuffer 100000000

I already removed a big file from my project. Not sure what else I can do.

While I have seen a few posts with one of the two git errors I have (remote end and pushing refs), none of them matched exactly what is happening to me nor fixed my issue.

Thanks in advance!

EDIT: I use Bitbucket and this issue is only happening on this Windows machine. No issues on another machine running MacOS.

If it helps, here is my git status on the Windows machine:

$ git status
On branch master
Your branch is ahead of 'origin/master' by 4 commits.
  (use "git push" to publish your local commits)

nothing to commit, working tree clean
Bruno Vieira
  • 151
  • 4
  • 9
  • What is the your Git provider? It looks like the remote has some problem, which may not have anything do with your local setup, assuming that were working previously. – Tim Biegeleisen Oct 28 '18 at 04:03
  • I use Bitbucket. Just tested pushing updates from a different computer (running mac) and it worked. The problem is that I have some local changes on the Windows machine I can't lose. – Bruno Vieira Oct 28 '18 at 04:08

1 Answers1

1

Considering BitBucket status reports no issue, there must be an issue on your Windows machine.

Try first to:

I have some local changes on the Windows machine I can't lose

Then, as a workaround, you can create a bundle of your local repo, copy the (one) file to your Mac, and pull from it. Then push from the local repo on your Mac.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250