Many user configuration files reside in `~/.*` files and directories. To aid in version controlling and deploying setups on new machines/hosts these can be backed up using a framework known as
====== GNU/Stow ======
There are a number of different tools that aid synchronising dotfiles between systems but I've opted for [GNU/Stow](https://www.gnu.org/software/stow/) as its one of the few that resides in Gentoo's portage and will therefore be updated automatically rather than me having to track (or learn how to automate tracking) of git based tools such as [dotgit](https://github.com/kobus-v-schoor/dotgit) or [Dotsync](https://github.com/dotphiles/dotsync).
Using GNU/Stow is pretty straight-forward, `mv` files under `~/` into their own `dotfiles` directory and then `stow` them, this will symlink all files in the programmes directory to `~/`
$ mkdir -p ~/dotfiles/bash && cd dotfiles/bash
$ mv ~/.bash* dotfiles/bash/.
$ cd dotfiles
$ stow bash
$ ls -l ~/.bash*
lrwxrwxrwx 1 neil neil 27 Sep 3 19:59 /home/neil/.bash_aliases -> dotfiles/bash/.bash_aliases
lrwxrwxrwx 1 neil neil 27 Sep 3 19:59 /home/neil/.bash_history -> dotfiles/bash/.bash_history
lrwxrwxrwx 1 neil neil 26 Sep 3 19:59 /home/neil/.bash_logout -> dotfiles/bash/.bash_logout
lrwxrwxrwx 1 neil neil 27 Sep 3 19:59 /home/neil/.bash_profile -> dotfiles/bash/.bash_profile
lrwxrwxrwx 1 neil neil 21 Sep 3 19:59 /home/neil/.bashrc -> dotfiles/bash/.bashrc
===== ~/.config =====
This took me a little trial and error to figure out (probably should have read the manual) but requires making a `~/dotfiles/config/.config` directory and moving files there...
$ mkdir -p ~/dotfiles/config/.config/transmission
$ mv ~/.config/transmission/settings.json ~/dotfiles/config/.config/transmission/.
$ cd dotfiles
$ stow config
$ ls -l ~/.config/transmission/settings.json
lrwxrwxrwx 1 neil neil 56 Sep 9 20:48 /home/neil/.config/transmission/settings.json -> ../../dotfiles/config/.config/transmission/settings.json
====== Dotbot ======
[Dotbot](https://github.com/anishathalye/dotbot) simplifies the process of cloning and installing your files on a new system. You should add it as a [[git:git#submodules|submodule]] to your `dotfiles` directory. Assuming you have already initialised your `~/dotfiles/` repo then as per the instructions...
cd ~/.dotfiles # replace with the path to your dotfiles
git init # initialize repository if needed
git submodule add https://github.com/anishathalye/dotbot
cp dotbot/tools/git-submodule/install .
touch install.conf.yaml
git add install.conf.yaml
git commit -m "Adding dotbot conf file"
Then modify your `install.conf.yaml` (see [documentation](https://github.com/anishathalye/dotbot#configuration) for details), save and commit changes.
====== Links ======
* [GitHub does dotfiles - dotfiles.github.io](https://dotfiles.github.io/) tons of resources on managing your dotfiles.
* [anishathalye/dotbot: A tool that bootstraps your dotfiles](https://github.com/anishathalye/dotbot)
* [Using GNU/Stow to manage your dotfiles](http://brandon.invergo.net/news/2012-05-26-using-gnu-stow-to-manage-your-dotfiles.html)
* [How to make your Dotfile management a painless affair](https://medium.freecodecamp.org/dive-into-dotfiles-part-2-6321b4a73608)