Show HN: A tool to keep dotfiles and system configs in sync with a Git repo
senotrusov Sunday, February 15, 2026Hi HN,
I built a small tool called etcdotica in Golang for keeping dotfiles and small system configs in sync with a Git or other VCS repository that mirrors your machine's filesystem layout.
I was not happy with many existing tools in that space.
The idea is simple: your repo looks like your system. A file at home/.bashrc maps to ~/.bashrc, while root/etc/... maps under /etc. Running the tool applies changes from the repo to the machine, and optionally collects newer edits made directly on the machine back into the repo. Deleting a file in the repo prunes it from the destination, so the state converges instead of drifting.
What it does:
* Syncs files from a source tree to a destination directory
* Collect mode to pull newer destination edits back into the repo
* Prunes removed files using a tracked state file
* Managed "sections" that insert named blocks into existing files instead of replacing them
* Watch mode to apply changes continuously, suitable for a user systemd service
* Safe concurrent runs via file locking
* Permission control: subtract bits with umask, add bits with a simple flag to enable world readability
* Automatic executable bits for selected directories like bin/
* Follows source symlinks, follows destination symlinks to folders, but replaces destination symlinked files with real files
The sections feature is particularly useful for shared files such as fstab or hosts. You can keep portable snippets in the repo, and they get merged into the target file, with the ability to later update or remove them as the source file gets updated or removed.
I wanted something light with predictable behavior.
A typical workflow is to clone the repo (for example ~/.dotfiles), run the tool once for user files, once with sudo for system files, and optionally keep a watch service running so edits in the repo materialize on the machine.
I'd love feedback on the idea.