Problems with checkout of dtc (Beaglebone Black)


I am following the recipe for the Beaglebone Black
by Robert Nelson:

While trying to check out dtc I came accross a problem.
Since my Linux (PC) is Gentoo I had to "disassemble" the and did the following steps by hand after
checking for the existence of the related config file:

    git clone git://

which gived me a 'dtc' directory.

cd dtc; ls -l .git/config
-rw-r--r-- 1 mccramer users 259 2013-08-02 07:29 .git/config

    >git checkout master -f
    Already on 'master'
    >git pull
    Already up-to-date.
    >git branch 65cc4d2748a2c2e6f27f1cf39e07a5dbabd80ebf-build -D
    error: branch '65cc4d2748a2c2e6f27f1cf39e07a5dbabd80ebf-build' not found.
    [1] 13159 exit 1 git branch 65cc4d2748a2c2e6f27f1cf39e07a5dbabd80ebf-build -D

The hashkey is from this block of the dtc-sh-script


What did I wrong? How can I prevent the failure?

Thank you very much for any help in advance!

Best regards,

Well it error's out, since you don't have that branch.. -D 'deletes'
the branch..

It's a hack, but [git branch ${git_sha}-build -D || true]

is a quick way to delete a branch, without checking if the branch
actually exists as the 'true' occurs if the branch didn't exist..

So here's the script re-worked without the 'hack'..