在服务器上 (site@site)
> git init --bare
回到我的客户
> git remote add origin site@site:/home/git/repos/repo_name/
> git push origin master
Counting objects: 43, done.
Delta compression using up to 2 threads.
fatal: git upload-pack: protocol error, expected to get sha, not '0000000000000000000000000000000000000000 f9b6ddffc38fe0cfcd0ab311197bb31d1fab4856 refs/heads/master'
Compressing objects: 100% (42/42), done.
error: pack-objects died of signal 13
error: failed to push some refs to 'site@site:/home/git/repos/repo_name/'
不确定是什么导致初始回购推送时出现此错误。我尝试用一个文本文件创建一个简单的存储库,并且成功了。我怀疑可能有一个文件导致了错误,但不确定如何追踪它是哪个文件(除了从存储库中删除所有内容并一次将它们添加回来)。