I converted my dotfiles to this approach https://www.atlassian.com/git/tutorials/dotfiles
- Clone the repo into bare
git clone --bare git@github.com:mfic/dotfiles.git $HOME/.cfg
- Define alias in current shell
alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'
2.1. Create a backup of current dotfiles
mkdir -p .config-backup && \
config checkout 2>&1 | egrep "\s+\." | awk {'print $1'} | \
xargs -I{} mv {} .config-backup/{}
- Checkout the actual content
config checkout
- Set the flag showUntrackedFiles to no on this specific (local) repository
config config --local status.showUntrackedFiles no