Closed musjj closed 1 year ago
You should not include cache files in your git repo regardless of dotbot. You can use negation in .gitignore
like this (ignore everything except those files and dirs):
*
!mpv.conf
!input.conf
!scripts
!scripts/**
!scripts-opts
!scripts-opts/**
I wasn't purposely including cache files in my dotfiles. It's just what happens when you link the folder directly (~/.config/mpv: mpv
).
But I figured out a simpler way to do this:
~/.config/mpv:
path: mpv/*
glob: true
This way only the files inside my mpv dotfiles gets linked, and not the other way around.
It would be useful to have an inclusion list to choose which files gets linked inside a folder.
This is useful for programs that puts cache and other files alongside the user's config.
In programs like mpv, every new scripts we install can potentially add additional cache files to our config, so tracking them with a
.gitignore
is kind of annoying.With an special syntax for includes, we can reduce something like:
into: