Restore configuration from GIT

Hi,

I’ve been struggling with finding the best way to restore my configuration from GIT.
I’ve looked at a similar post (Restore previous config from Github), but this seem to not deal with a few apparent issues.

The gist of the post is to use git clone to clone into the repository, but GIT does not allow cloning into non-empty directories, so I did an rm -Rf to clear the contents of the home assistant config folder (I put my hope in HA restoring all the files that were necessary and not cloned - such as the HA database) and then cloned the contents of the repo. Unfortunately, aiohttp started to spew errors after I booted the Home Assistant service after that and I was unable to boot HA.

Can any git experts tell me the best way to restore my configuration?
Hopefully we can work out a way to do this, so that we can add it to the documentation (Back-up to Github).

Thanks!

you only store the /config folder on GIT, leave to HA folder alone

Hi HypnoToad, thanks for the reply.

Edited my original post to remove ambiguity. Obviously I meant I removed the HA config folder. Nonetheless, this does contain some files that are not in source control, such as the .storage folder and the HA SQLite database.

the .storage folder and the HA SQLite database

try adding these to the .gitignore file, that they these should not be touched my version control.

I must admit I don’t really know the git commands that well, I use Sourcetree usually.