Introduction
I used to manage my dotfiles1 with a bare git repository, its simple, but dotfiles are all over the place, it’s hard for me to get a whole view of them.
So now I’ve switched to stow2, which is a symlink manager to help you put all files you want in one place and symlink them to where they belong (it creates symlink for files in one folder to another folder).
First Time Setup
So the first time we use stow to manage our dotfiles, we just need to follow these steps.
- create dotfiles folder in your home directory (preferably)
- move files to that folder
- add
.stow-local-ignore
file (Types And Syntax Of Ignore Lists) - create symbolic links back to the files moved (stow the dotfiles directory)
- (optional) backup the folder (like pushing to github)
And this is is an example of mine:
|
|
The .stow-local-ignore
file if for telling stow that you don’t want to symlink some files, you want to ignore them, here’s mine.
|
|
restore from a dotfiles backup
Restoring dotfiles is very simple, just recreate the symbolic links.
- restore the dotfiles directory (git clone)
- create symbolic links back
Other useful commands of stow
|
|
use
a bare git repositorystow to manage my dotfiles. ↩︎