This repo manages my dotfiles using GNU Stow.
The core idea is to keep configuration files in a central repository (e.g., ~/repos/dotfiles) and symlink only the contents of the dotfiles directory to $HOME.
-
Ensure you have
stowandjustinstalled. -
Clone this repository to your preferred location:
git clone https://github.com/tpwo/dotfiles.git ~/ws/private/repos/tpwo/dotfiles cd ~/ws/private/repos/tpwo/dotfiles
-
Run
just dry-runto see if stow works correctly and see what will be done. -
Use
just adoptto symlink dotfiles stored in this repo while preserving any changes you might have locally. -
Run
git statusto see if any of the files in the repo were affected. They are now reflecting what you had back at your$HOME.
Warning
stow already symlinked your $HOME, so editing files in dotfiles folder now affects files at your $HOME.
- Voilà! All files from dotfiles folder should now be symlinked into your
$HOME.
When you add any new dotfile to this repo, you can sync it with just sync .
Get rid of symlinks with just clean.
Important
just clean only deletes the symlinks, so you have to manually add your dotfiles back into $HOME.
Create a ~/.gitconfig.local file. It will be automatically imported by .gitconfig stored in this repo.