Skip to main content

Dotfiles Management with GNU Stow

  1. Create folder ~/dotfiles
  2. initialize git repo
echo "# dotfiles" >> README.md
git init
git add README.md
git commit -m "first commit"
git branch -M main
git remote add origin https://github.com/Cyber-Syntax/dotfiles.git
git push -u origin main
  1. take backup for your files you want to setup with gnu stow
  2. Make folder for ~/.config
mkdir -p ~/dotfiles/dot-config/
  1. Copy your configs
cp -r ~/.config/nvim ~/dotfiles/dot-config/
  1. test stow dry without change anything to make sure about changes correct
stow -n -v --dotfiles --target="$HOME" .
  1. If everythings work perfect, stow your files
stow --dotfiles --target="$HOME" .
  1. make alias, zsh alias or bash. Also, stowrc alias too. make a file ~/dotfiles/.stowrc
--dotfiles
--target="$HOME"
--ignore=.stowrc
  1. stow files to symlink

[!WARNING]

stay on the ~/dotfiles dir or it will cause issue if you stay on the ~/dotfiles/dot-config/ it would make symlink to ~/dotfiles/i3 , ~/dotfiles/nvim etc.

stow .