GitHub version control

I have started customizing my installation and frontend and want to implement GitHub version control but have little experience with GitHub. I have been doing all my development in Visual Studio Code and was wondering if there was any write up on how to push my config to GitHub.

I haven’t seen anything.

I created a GitHub repo and run the GitHub client on my PC. To initialize the repo I copied everything over from the HA config directory (including .storage, and custom components, etc.) to the PC folder for the GitHub repo. You may want to create a gitignore file to ignore log files, secrets.xml and anything else you don’t want to version control. Commit and push this, that’ll give you your initial repo.

To make changes, my workflow is

  1. Edit the files on the PC using vscode
  2. Review the changes in GitHub client
  3. Copy the files over to HA
  4. Click check configuration
  5. Test changes
  6. When happy I then commit them to GitHub

Periodically, I’ll re copy everything from HA, and check changes in (like before a version upgrade and after)

Most of my packages are created from templates. I use shell scripts running in WSL to substitute strings in the templates to create the HA package. For example I have a temperature template that allows enabling and setting high / low alarm limits. I have a dozen temperature sensors, so I just use SED to create the 12 packages using substitution (entity id, prefixes)

I am running the Visual Studio code addon in my Home Assistant instant that is running in a VM on a PC. Is it possible to keep everything contained to that VM?