From 190e4ca8de27003bd123822f6ae3975591bf9e8f Mon Sep 17 00:00:00 2001 From: Peter Date: Tue, 1 Feb 2022 12:38:14 +0000 Subject: Update post --- content/posts/notes-on-storing-dotfiles.md | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'content') diff --git a/content/posts/notes-on-storing-dotfiles.md b/content/posts/notes-on-storing-dotfiles.md index d9635a4..2ffd638 100644 --- a/content/posts/notes-on-storing-dotfiles.md +++ b/content/posts/notes-on-storing-dotfiles.md @@ -40,6 +40,21 @@ If you'd like to see what has changed before you commit them, you can run: dotfiles diff $HOME/.config/bspwm/bspwmrc ``` +Another point worth noting, [shamelessly stolen from jbauer](https://www.paritybit.ca/blog/how-i-manage-my-dotfiles) is omitting repository specific files (`readme.md`, `licence`, etc) via the `--skip-worktree` option, for example: +``` +dotfiles add readme.md +dotfiles commit -m "Add Readme" +rm readme.md +dotfiles update-index --skip-worktree readme.md +``` + +And then to update this file: +``` +dotfiles update-index --no-skip-worktree readme.md +dotfiles checkout -- readme.md +``` + And you're done. This guide is by no means unique, but has been collated from many posts accross the Internet detailing this process. -* **Edit 2020-07-21:** Added note about diffing changes \ No newline at end of file +* **Edit 2020-07-21:** Added note about diffing changes +* **Edit 2021-11-29:** Added note about removing files from the work tree \ No newline at end of file -- cgit v1.2.3