gitvisual-studio-codegithubversion-control

Connection Lost During git pull/push Process


I have been working on a remote machine and trying to push/pull during process, electrics went down and wifi, So in the middle of upload or download (I used the vs code sync so idk in what process it was in) the wifi is gone.

When I come back and I tryed to

git pull
fatal: git fetch-pack: expected ACK/NAK, got '?TF401031: The Git pack entry header is invalid.'
fatal: the remote end hung up unexpectedly

git fetch
fatal: git fetch-pack: expected ACK/NAK, got '?TF401031: The Git pack entry header is invalid.'
fatal: the remote end hung up unexpectedly

and I can't push the remote changes because there are other people's changes on the git server.

Any idea what the problem is and how can I solve it?

(I have checked buffersize increase suggestions on other solutions and it didn't work.)


Edit 1:

git gc

didn't solve the problem


Edit 2:

git remote show origin

It works, and we are connected to remote


Edit 3:

Creatinga new branch from remote and tryed to pushing it failed

git push
! [remote rejected] backup -> backup (TF401031: The Git pack entry header is invalid.)
error: failed to push some refs to <git_server>

I really don't know why put negative points to my question but I can't fix it and just asking for suggestion.


Solution

  • The problem was probably about invalid header between local git and remote git on TFS server. Fresh push to a new repository solved the problem.