Dotfiles Management with GNU Stow
- Create folder ~/dotfiles
- 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
- take backup for your files you want to setup with gnu stow
- Make folder for ~/.config
mkdir -p ~/dotfiles/dot-config/
- Copy your configs
cp -r ~/.config/nvim ~/dotfiles/dot-config/
- test stow dry without change anything to make sure about changes correct
stow -n -v --dotfiles --target="$HOME" .
- If everythings work perfect, stow your files
stow --dotfiles --target="$HOME" .
- make alias, zsh alias or bash. Also, stowrc alias too. make a file ~/dotfiles/.stowrc
--dotfiles
--target="$HOME"
--ignore=.stowrc
- 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 .