paritybit.ca

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit c87690346ddb7ad11fedf0fc99fbb9fd40dfe3db
parent 1cae4e1f6176be87efa1c9011eab1e07d8a66316
Author: Jake Bauer <jbauer@paritybit.ca>
Date:   Wed,  9 Sep 2020 09:17:35 -0400

Add setup commands for dotfile management

Diffstat:
Mpages/blog/how-i-manage-my-dotfiles.md | 22+++++++++++++++++++++-
1 file changed, 21 insertions(+), 1 deletion(-)

diff --git a/pages/blog/how-i-manage-my-dotfiles.md b/pages/blog/how-i-manage-my-dotfiles.md @@ -9,7 +9,7 @@ <div class="byline"> <b>Written By:</b> Jake Bauer | <b>Posted:</b> 2020-06-13 | - <b>Last Updated:</b> 2020-06-13 + <b>Last Updated:</b> 2020-09-09 </div> I've recently overhauled a lot of the software I use which means I have a whole @@ -25,6 +25,26 @@ I recently read about [managing dotfiles with a bare repository](https://www.atlassian.com/git/tutorials/dotfiles) and switched to doing it that way. +This is what's required to set it up: + +```bash +git init --bare $HOME/docs/proj/dotfiles +alias config='git --git-dir=$HOME/docs/proj/dotfiles --work-tree=$HOME' +config config --local status.showUntrackedFiles no +``` + +And this is what needs to be done on a new machine to deploy my dotfiles: + +```bash + git clone --bare https://git.paritybit.ca/~jbauer/dotfiles $HOME/docs/proj/dotfiles + rm ~/.bashrc ~/.profile + alias config='git --git-dir=$HOME/docs/proj/dotfiles --work-tree=$HOME' + config checkout + config config --local status.showUntrackedFiles no + config update-index --skip-worktree LICENSE README.md .gitignore + rm LICENSE README.md .gitignore +``` + I opted for this method over using another application like [chezmoi](https://github.com/twpayne/chezmoi) or [GNU Stow](https://www.gnu.org/software/stow/) because I didn't want _Yet Another Bit