[FIXED] Upgrade from openhabian config from 1.3 to 1.4 was interrupted in the middle. Now it's empty

Hi,

I updated the config tool from 1.3 to 1.4. The update process went fine and I restarted the tool and it began processing with the following output:
[23:07:37] openhabian@openHABian:~$ sudo openhabian-config
2018-01-08_23:07:43_CET [openHABian] Checking for root privileges… OK
2018-01-08_23:07:43_CET [openHABian] Loading configuration file ‘/etc/openhabian.conf’… OK
2018-01-08_23:07:43_CET [openHABian] openHABian configuration tool version: [master]v1.4-366(0bb3558)
2018-01-08_23:07:43_CET [openHABian] Checking for changes in origin…

The problem is that at this point my Pine64 had a power outage and now after rebooting the /usr/local/bin/openhabian-config which is a link to /opt/openhabian/openhabian-setup.sh doesn’t work anymore. In fact the file /opt/openhabian/openhabian-setup.sh is 0 bytes.

Please help, I spent hours configuring my openHAB how can I get back a working config-tool and complete the update from 1.3 to 1.4??

Thanks

UPDATE: it seems that most of the files in /opt/openhabian directory are empty. but the .git directory seems to be ok. doing a “git status” reveals a lot of modified files, probably the ones which now have 0 size. Should I do a “git reset” or something? How can I populate the workspace with the proper files without killing my conifguration?

UPDATE2: I finally solved it. I first reverted all modifications to have a clean git state but then I was back at v1.3. So I tried upgrading to v1.4 which turned out the git repo was broken (actually the v1.4 tag reported stuff like -> bad object -> broken ref and other weird message and could not be pruned or fetched). Long story short after fixing my git repo by removing the broken 1.4 tag and fetching it again the script is now running in v1.4