Git checkout throws fatal link is not a tree

I deployed the code using capistrano to a remote machine, but I get the following error. How do I get rid of this problem.

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 
+4
source share
1 answer

I had to deal with a broken repository. After commenting on the Capistrano smallow clone option ( :git_shallow_clone, 1 , which gives --depth 1 ), the deployment works well.

See the accepted answer to this question for a detailed explanation of how this can be fixed: Git head submodule header error is not a tree error

+3
source

Source: https://habr.com/ru/post/1479028/


All Articles