This repo stores my dotfiles for bash, vim, etc.
I followed these instructions to set this up to track the files in $HOME directly without symlinking or copying. Also see here and here.
Steps followed:
cd $HOME
git init --bare .dotfilesgit
alias dotfilesgit='/usr/bin/git --git-dir=$HOME/.dotfilesgit/ --work-tree=$HOME'
#don't show everything in HOME as untracked when we do dotfilesgit status
dotfilesgit config --local status.showUntrackedFiles no
#for each file
dotfilesgit add .bashrc
#then
dotfilesgit commit
dotfilesgit remote add origin <my-github-repo-url>
dotfilesgit push
To replicate this on a new machine:
git clone --separate-git-dir=$HOME/.dotfilesgit https://github.com/theopauw/dotfiles .dotfilesgittmp
rsync --recursive --verbose --exclude '.git' .dotfilesgittmp/ $HOME/
rm --recursive .dotfilesgittmp/
Vim: I am deliberately not including the installation script for vim-plug. To use plugins, download plug.vim and put it in the "autoload" directory. Shortcut:
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim