Comment

Comment by bminusl

Files are tracked by a bare git repository, e.g. `~/.dotfiles`.

The trick is to use the combination of --git-dir and --work-tree git options. An alias can be defined to simplify the process: `alias dotfiles='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'`.

`dotfiles` can be used as you would use `git`, e.g.:

- `dotfiles add <file>`

- `dotfiles commit [options]`

parent bminusl 5 years ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton