The dotfiles support bash (on Linux) and zsh (on macOS and Linux). These are meant to give me a consistent environment across the UNIX computers I use.
Before starting, make sure the repository isn't going to write over important existing files. It's a good idea to rename .bashrc
and .zshrc
to .bashrc.local
and .zshrc.local
.
# Create `.dotfiles` folder
mkdir ~/.dotfiles
cd ~/.dotfiles
# Set up bare Git repo
git init --bare
git remote add origin [email protected]:thegreatrazz/dotfiles.git
git config status.showUntrackedFiles no
# Set up alias (temporarily)
alias dotfiles="/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME"
# Pull the repo
dotfiles pull origin master
# Add file, commit, push
dotfiles add .zshrc
dotfiles commit
dotfiles push
# Download
dotfiles pull
- Distrotube, Git Bare Repository - A Better Way To Manage Dotfile
- Arch Wiki, Dotfiles