2 ms·
I like the bare repository approach here. I've been using symbolic links to version control my dotfiles with git.
by uneekname 5y ago
I like the bare repository approach here. I've been using symbolic links to version control my dotfiles with git.
- poidos 5y agoI do the same using `stow`, and like it a lot.
- lefrenchy 5y agoI gave it a quick glance but didn't understand, how is OP's link managing it instead of symbolic links?
- deleted 5y ago[deleted]
- bminusl 5y agoFiles 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]`
- yjftsjthsd-h 5y agoBy telling git to use `--work-tree=$HOME`, they tell git to directly work on the files in their home directory; no symlinks needed.