git checkout抛出致命引用不是树

Rpj*_*Rpj 5 git capistrano

我使用capistrano将代码部署到远程计算机上,但是出现以下错误。我如何摆脱这个问题。

    executing locally: "git ls-remote git@github.com:mycompany/foo.git staging"
    command finished in 468ms
  * getting (via checkout) revision df3d0367fd021d83f881f5d7261dba3f891bca22 to /tmp/20130503165924
    executing locally: git clone -q --depth 1 git@github.com:mycompany/foo.git /tmp/20130503165924 && cd /tmp/20130503165924 && git checkout -q -b deploy df3d0367fd021d83f881f5d7261dba3f891bca22
fatal: reference is not a tree: df3d0367fd021d83f881f5d7261dba3f891bca22
Run Code Online (Sandbox Code Playgroud)

Ton*_*ado 5

我也不得不处理一个损坏的存储库。在注释掉 Capistrano 的浅克隆选项(:git_shallow_clone, 1产生--depth 1)之后,部署运行良好。

有关如何修复它的详细说明,请参阅此问题的已接受答案:Git submodule head 'reference is not a tree' error