Sync HA config to GitHub for Copilot integration — looking for best approach

Hi everyone,

I’m looking for the best way to automatically sync my Home Assistant configuration files to a private GitHub repository, with two goals:

  1. Version control my YAML files (automations, scripts, configuration, ESPHome devices)
  2. Use GitHub Copilot on those files to help build new automations

My setup: HAOS on two separate installations, each with its own private repo.

I tried GithubConfigSync (MJP-76) and it works well overall, but I noticed that directory entries in .gitignore don’t seem to be respected — folders listed there get uploaded anyway, making the repo heavier than needed and adding noise for Copilot.

Has anyone found a reliable solution that:

  • Runs automatically on a schedule
  • Properly respects .gitignore including directory exclusions
  • Works on HAOS without manual intervention?

Any suggestions welcome!

Thanks