Synchronising config files across machines

January 3, 2015 — July 11, 2023

computers are awful
computers are awful together
distributed
diy
P2P
Figure 1

A special case for file sync. Want to synchronise text-based settings between computers?

1 fig

One of the functions for CLI multitool fig is synchronising dotfiles. Should test that.

2 Mackup

You might try mackup to sync settings for Linux and OSX machines alike to some folder somewhere. It’s a database of which actual settings of various apps are actually syncable. On second thoughts, this is a fragile approach. And it freaks out if you have non-ASCII characters in your filenames. Do something different.

3 DIY with git

Use a bare git repo:

git init --bare $HOME/.dotfiles
alias dotfiles='git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'
dotfiles config --local status.showUntrackedFiles no
echo "alias dotfiles='git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'" \
  >> $HOME/.bashrc

Yes, much less freaky.

Actually, do you know what is even easier? Just make a git repo in your root dir. No more overthinking. Re-revised recommendation:

git init $HOME
git config --local status.showUntrackedFiles no

Now! go forth and steal other people’s dotfile tricks.