That would be useful to me too. And I considered (lazy) ways to achieve a similar effect.
(It seems that the erroneous assumption that .d / structures are useful only for a certain physical size, but this is simply due to a decrease in complexity when several external systems want to manage a single resource without heavy overhead. Consider / etc / apt / sources. list - most people sources.list files are less than 5 lines, but everyone understands the benefits of having partner sources. list.d / structure.)
Returning to .gitignore - etckeeper solves this problem for itself within /etc/.gitignore using the old classic:
# begin section managed by etckeeper (do not edit this section by hand) ...
This section can be changed with any update to etckeeper, natch.
Thus, one obvious option is to use a similar subsystem for this, identifying it accordingly. A bit messy, according to the code, perhaps than the git-merge-line set, but perhaps a more documented / more ordinary / more convenient approach to workflow.
source share