I use these exclusively on the latest version of macOS and don't pull them down enough to verify that they can be cloned without issues arising.
git init --bare $HOME/.dotfiles
alias dotfiles='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'
dotfiles config --local status.showUntrackedFiles no
echo "alias dotfiles='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'" >> $HOME/.bashrc
alias dotfiles='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME
echo ".dotfiles" >> .gitignore
git clone --bare --recursive https://github.com/michaeljdeeb/dotfiles.git $HOME/.dotfiles
alias dotfiles='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME
dotfiles checkout
Source: The best way to store your dotfiles: A bare Git repository
To safely delete ~/README.md
locally, run dotfiles update-index --assume-unchanged README.md
If you need to update README.md
, run dotfiles update-index --no-assume-unchanged README.md
For example, installing vim-airline:
cd ~/.vim/bundle
dotfiles submodule add https://github.com/vim-airline/vim-airline
For example, upating vim-airline:
cd ~/.vim/bundle/vim-airline
dotfiles pull
dotfiles submodule update --recursive --remote
For some reason, the above command does not properly update YouCompleteMe and the following additional steps must be done.
cd ~/.vim/bundle/YouCompleteMe/
git submodule update --init --recursive
./install.py --tern-completer
For example, removing vim-airline:
cd ~/.vim/bundle
dotfiles submodule deinit -f vim-airline
dotfiles rm -rf vim-airline