Note that the only two differences between using a bare and non-bare repository are:
presence of the --bare flag when initialising and cloning the repo the path to the Git directory, $HOME/.cfg/ for bare and $HOME/.cfg/.git/ for non-bare.
- git init $HOME/.cfg
- alias cfg='/usr/bin/git --git-dir=$HOME/.cfg/.git/ --work-tree=$HOME'
- echo "alias cfg='/usr/bin/git --git-dir=$HOME/.cfg/.git/ --work-tree=$HOME'" >> $HOME/.zsh/aliases
- cfg config --local status.showUntrackedFiles no
- cfg add .vimrc + cfg commit -m "add .vimrc" + Set up a remote repository on GitHub or your Git server of choice + cfg push
- echo ".cfg" >> .gitignore
- git clone $HOME/.cfg
- alias cfg='/usr/bin/git --git-dir=$HOME/.cfg/.git --work-tree=$HOME'
- cfg config --local status.showUntrackedFiles no
- cfg checkout
- git init --bare $HOME/.cfg
- alias cfg='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'
- echo "alias cfg='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'" >> $HOME/.zsh/aliases
- cfg config --local status.showUntrackedFiles no
- cfg add .vimrc + cfg commit -m "add .vimrc" + set up a remote repository on GitHub or your Git server of choice + cfg push
- echo ".cfg" >> .gitignore
- git clone --bare $HOME/.cfg
- alias cfg='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'
- cfg config --local status.showUntrackedFiles no
- cfg checkout
- https://www.ackama.com/blog/posts/the-best-way-to-store-your-dotfiles-a-bare-git-repository-explained
- https://www.atlassian.com/git/tutorials/dotfiles
- https://bitbucket.org/durdn/cfg/src/master/
- https://news.ycombinator.com/item?id=11070797
- https://shapeshed.com/vim-netrw/#netrw---the-unloved-directory-browser