Upgrade from v2.0.0.beta10 +37 to 2.1.0.beta1 does fail

One additional thing, I read in some of the beta release notes of 2.0 (I think it was beta 6 or 7) that it will automatically upgrade to postgres 10.
But even though I always had installed every new beta I just noticed that our installation it is still on postgres 9.5 (psql (PostgreSQL) 9.5.12)
I assume I will have to follow the instructions mentioned in the template of this post to get it on 10, right?

I also tracked the complete output in my last try into a file in order to check the output.
I do see that the rebuild starts with a fatal:

root@marktplatz:/var/discourse# ./launcher rebuild app
fatal: ref HEAD is not a symbolic ref
Stopping old container
+ /usr/bin/docker stop -t 10 app
app
cd /pups && git pull && /pups/bin/pups --stdin
Already up-to-date.

I remember that I have seen the fatal already for quite some time but it still did upgrade the betas.
I do see in the /var/discourse/.git directory a file called HEAD from last year
-rw-r–r-- 1 root root 41 Oct 18 2017 HEAD

What will I have to do to remove the fatal at the beginning?