Managing Dotfiles with Bare Git

Published: 2026-01-14

Standard symlinking tools like GNU Stow are bloated and unnecessary. By using a bare repository, we can track configuration files directly in $HOME without the mess.

Setup

First, initialize the bare repository:

git init --bare $HOME/.cfg

Then, define a local alias to interact with it:

alias dots='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'

Why this is superior