To install GNU Stow, use your preferred package manager
$ sudo zypper up
$ sudo zypper in stow
- - refers to the name of the directory where the dotfiles git repo lives
Make sure that is a subdirectory of
$HOME
$ cd ~/<dotfiles> && stow .
You may need to add the --adopt
flag to stow to override existing configurations in $HOME
$ cd ~/<dotfiles> && stow --adopt .
- - refers to the name of the directory where the dotfiles git repo lives
- - The directory path where the file/s live
- - The file's name, this is the file you want to add/update/delete
Add a new file to the dotfiles repo
$ mv ~/<path>/<file> ~/<dotfiles>/<path>/<file>
$ cd ~/<dotfiles> && stow .
As GNU Stow uses symlinks, you can simply edit it (in either ~// or ~///) and the changes will be present in both locations
Remove a file from GNU Stow and the filesystem
$ rm ~/<dotfiles>/<path>/<file>
$ rm ~/<path>/<file>
Remove a file only from GNU Stow, but keep it in the filesystem
$ rm ~/<path>/<file>
$ mv ~/<dotfiles>/<path>/<file> ~/<path>/<file>
$ cd ~/<dotfiles> && stow .
$ cd ~/<dotfiles>
$ git add .
$ git commit -m "Your message here"
$ git push origin master
$ cd ~/<dotfiles>
$ git pull origin master
$ stow -- adopt .