My dotfiles and configurations.
See this article that explains the setup of the repository.
git init --bare $HOME/.cfg
alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'
config config --local status.showUntrackedFiles no
echo "alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'" >> $HOME/.zshrc
# https
git clone --bare https://github.com/lukasfro/cfg.git $HOME/.cfg
# ssh
git clone --bare [email protected]:lukasfro/cfg.git $HOME/.cfg
alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'
config checkout
if [ $? = 0 ]; then
echo "Checked out config.";
else
mkdir -p .config-backup
echo "Backing up pre-existing dot files.";
config checkout 2>&1 | egrep "\s+\." | awk {'print $1'} | xargs -I{} mv {} .config-backup/{}
fi;
config checkout
config config status.showUntrackedFiles no
source $HOME/.zshrc