dotfiles

How i setup this repo

# Init a bare repo
git init --bare $HOME/.dotfiles
# add alias to shell configuration
echo 'alias dotfiles="/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME"' >> $HOME/.zshrc
# Reload the shell setting
source ~/.zshrc
# Prevent untracked files from showing up when we call dotfiles status
dotfiles config --local status.showUntrackedFiles no

How i use them

dotfiles status
# add any dotfiles to repo
dotfiles add .vimrc
dotfiles commit -m "Add vimrc"
dotfiles remote add origin https://MeisterTea@github.com/MeisterTea/dotfiles.git
dotfiles push origin master

How install dotfiles to another system

echo 'alias dotfiles="/usr/bin/git --git-dir=$HOME/.dotfiles.git/ --work-tree=$HOME"' >> $HOME/.zshrc
source ~/.zshrc
# Add .dotfiles directory to .gitignore to prevent recursion issues
git clone --bare https://MeisterTea@github.com/MeisterTea/dotfiles.git $HOME/.dotfiles.git
dotfiles checkout
dotfiles config --local status.showUntrackedFiles no