01/15/2023 23:10 | Category: golang

Tags: linuxgitautomation

auto committing to git repos and the things we do for love

Recently my partner lost some files, to avoid having this happen in the future I decided to write a tool. Most of our important personal notes are stored in Git repositories, we like to keep them accessible on each of our machines easily.

To ensure these notes are synced with the Git remote host, I wrote push-me.

This tool does a few cool things:

  • Creates a configuration file to hold relative paths to git repos that should be pushed to the remote host
  • Adds a crontab task that executes the push-me binary hourly

Now, my partner only needs to edit a single configuration file to ensure that her own personal "auto save" is enabled.

Example .push-me-config.yml:

repos:
    - "my-repo/path/here"
    - "my-other-repo/path/here"