To add this config to your system:
git clone --bare https://github.com/andredp/dot-files.git $HOME/.cfg
function config {
/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME $@
}
mkdir -p .config-backup
config checkout
if [ $? = 0 ]; then
echo "Checked out config.";
else
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
Alternatively you can do:
curl -Lks https://gist.githubusercontent.com/andredp/554faa5ea94c0267aa5cf6698a004ab4/raw/2d85a90acde7d90faa50d45e586eabe871b1114f/cfg-install.sh | /bin/bash
After that you can do stuff like:
config add file1
config commit -m "Add file1"
config push
Things you might want to install on a fresh system: