Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git checkout throws fatal reference is not a tree

Tags:

git

capistrano

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

    executing locally: "git ls-remote [email protected]:mycompany/foo.git staging"
    command finished in 468ms
  * getting (via checkout) revision df3d0367fd021d83f881f5d7261dba3f891bca22 to /tmp/20130503165924
    executing locally: git clone -q --depth 1 [email protected]:mycompany/foo.git /tmp/20130503165924 && cd /tmp/20130503165924 && git checkout -q -b deploy df3d0367fd021d83f881f5d7261dba3f891bca22
fatal: reference is not a tree: df3d0367fd021d83f881f5d7261dba3f891bca22
like image 432
Rpj Avatar asked May 03 '13 16:05

Rpj


1 Answers

I had to deal with a broken repository too. After commenting out Capistrano's shallow clone option (:git_shallow_clone, 1 which yields --depth 1) deployment worked well.

See the accepted answer of this question for a detailed explanation on how to possibly fix it: Git submodule head 'reference is not a tree' error

like image 129
ToniTornado Avatar answered Oct 24 '22 14:10

ToniTornado