skip to Main Content

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.

2

Answers


  1. Chosen as BEST ANSWER

    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.


  2. This is a new problem for me. But you may try to create a new branch from the latest remote repo. Then merge your changes to this new branch in your local. Then push your changes to this new branch. After you may merge your changes from your new development branch to target development branch.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search