reference: https://www.atlassian.com/git/tutorials/dotfiles
echo "alias dtf='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'" >> $HOME/.zshrc
echo ".dotfiles" >> .gitignore
git clone --bare https://github.com/akasuv/dotfiles $HOME/.dotfiles
alias dtf='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'
dtf checkout
--- Possible Errors ---
error: The following untracked working tree files would be overwritten by checkout:
.bashrc
.gitignore
Please move or remove them before you can switch branches.
Aborting
--- Solution ---
mkdir -p .config-backup && \
dtf checkout 2>&1 | egrep "\s+\." | awk {'print $1'} | \
xargs -I{} mv {} .config-backup/{}
--- Re-Run ---
dtf checkout
dtf config --local status.showUntrackedFiles no