Skip to content

dotfiles

Christopher P. Brown edited this page Jul 12, 2020 · 1 revision

Dotfiles

you should keep your dotfiles in version control.

Regular Old Git Repo

aka, a "ROGR"

I keep all my dotfiles in ~/dotfiles and symlink them.

=> https://github.com/chrisman/dotfiles

If you do this, and have to set up new computers enough, you will eventually probably commit a couple of .sh files to your dotfile repo to handle installs and symlinking for you.

Gnu Stow

GNU Stow is a symlink farm manager

Never used it, myself. Carlos recommends it.

=> https://www.gnu.org/software/stow/

Bare Home Work Tree Alias

Here is a novel way to do that using a bare repository, and a custom alias that sets up the git dir and work tree so that you can selectively add files using your entire $HOME dir at a working tree. It's kind of cool.

setup:

git init --bare $HOME/Dotfiles
echo "alias dotfiles='/usr/bin/git --git-dir=$HOME/Dotfiles --work-tree=$HOME'" >> $HOME/.zshrc
dotfiles config --local status.showUntrackedFiles no

usage:

dotfiles status
dotfiles add .bashrc
dotfiles commit -m "Added .bashrc"
dotfiles remote add origin host:git/dotfiles.git
dotfiles push

=> https://news.opensuse.org/2020/03/27/Manage-dotfiles-with-Git

Clone this wiki locally