From: quilime Date: Fri, 11 Dec 2020 23:18:16 +0000 (-0800) Subject: Create README.md X-Git-Url: https://git.quilime.com/?a=commitdiff_plain;h=1d755ff1e5059f309dda0a1eae110b2a92c3123f;p=cfg.git Create README.md --- diff --git a/README.md b/README.md new file mode 100644 index 0000000..cb2dbd3 --- /dev/null +++ b/README.md @@ -0,0 +1,46 @@ +# dotfiles + + +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. + +# Storing your dotfiles using a non-bare, default repository: + +1. git init $HOME/.cfg +2. alias cfg='/usr/bin/git --git-dir=$HOME/.cfg/.git/ --work-tree=$HOME' +3. echo "alias cfg='/usr/bin/git --git-dir=$HOME/.cfg/.git/ --work-tree=$HOME'" >> $HOME/.zsh/aliases +4. cfg config --local status.showUntrackedFiles no +5. cfg add .vimrc + config commit -m "add .vimrc" + Set up a remote repository on GitHub or your Git server of choice + config push + +# Install + +1. echo ".cfg" >> .gitignore +2. git clone $HOME/.cfg +3. alias cfg='/usr/bin/git --git-dir=$HOME/.cfg/.git --work-tree=$HOME' +4. cfg config --local status.showUntrackedFiles no +5. cfg checkout + +# Using a bare repository like @durdn's tutorial + +1. git init --bare $HOME/.cfg +2. alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME' +3. echo "alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'" >> $HOME/.zsh/aliases +4. config config --local status.showUntrackedFiles no +5. config add .vimrc + config commit -m "add .vimrc" + set up a remote repository on GitHub or your Git server of choice + config push + +# Install + +1. echo ".cfg" >> .gitignore +2. git clone --bare $HOME/.cfg +3. alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME' +4. config config --local status.showUntrackedFiles no +5. config checkout + + +# References, Links +- 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