git fatal - the remote hung up unexpectedly but not RPC or permission or broken pipe related message

后端 未结 1 1265
一向
一向 2021-01-28 15:39

I have seen many post here on SO about git fatal: the remote end hung up unexpectedly issue but none of them seem to be related to mine.

All posts about this error on he

相关标签:
1条回答
  • 2021-01-28 15:44

    The message in the latter case is because your Git objects are malformed. GitHub runs an fsck (consistency check) when accepting objects, and one of your tree (directory) objects contains multiple entries for the same file. Git wouldn't know how to check out such a tree entry: should it use the former entry, or the latter?

    If you're using software other than Git itself to commit in your repository, you should report this issue to the makers of that software, since it's likely that software is writing bad data. Hopefully the makers of that software can give you tips for fixing the issue.

    As for fixing this problem on your own, you could try to fix your branch with a force rebase. If you pick the branch from which your current branch was created, say master, you can then write git rebase --force master. That should cause Git to rebase your commits, and hopefully it will rewrite the tree objects that were corrupt.

    0 讨论(0)
提交回复
热议问题