How to upgrade if `/var/discourse` has only `shared` and is not git repo

Not so good idea because /var/discourse does exist and contains shared