Post

Dotfiles & Config Setup using Git

Dotfiles

Dotfiles are files that’s used by applications or packages for storing it’s configurations. It’s called a dot file as it’s naming starts with a dot > .

Common dotfiles include .zshrc .bashrc .gitignore and are mostly stored in your home under .config directory.

In this guide, I’ll list out the steps that I found to be the most way of storing, backing up the .dotfiles . The easiest and most efficient way of storing dot files are by using symlinks. It avoids duplication and allows you to use git to track and version changes, acting as a backup in case some configs go haywire with a single command.

eg: managing the .zshrc

1
2
3
4
mkdir ~/.dotfiles/zsh/
mv ~/.zshrc ~/.dotfiles/zsh/
ln -s ~/.dotfiles/zsh ~/.zshrc
cd ~/.dotfiles ; git init
This post is licensed under CC BY 4.0 by the author.