Avram's Dotfiles
To start, create a bare repository in your home folder:
git init --bare $HOME/.cfg
Set a local alias for config
to easily interact with our dotfiles:
alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'
config config --local status.showUntrackedFiles no
Using this command, or manually, add the alias to your terminal config:
echo "alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'" >> $HOME/.zshrc
Make sure the .cfg
folder is in .gitignore
Clone the files to your home folder and run checkout:
git clone --bare https://github.com/aviemet/aliases.git $HOME/.cfg
alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'
config checkout
If you are prompted regarding collisions, backup the offending files and run config checkout
again.