So I've been looking after some of the PRs in the github/gitignore repository recently and found myself lamenting how things currently work.
One of the areas I'd love to improve is how metadata related to changes is tracked. Currently it's ad-hoc, and requires maintainers to understand details about the impact of changes - and often others want to understand a change after it's been merged.
Here's a (good) example of a rule within a gitignore file:
> less Node.gitignore # Dependency directory # https://docs.npmjs.com/misc/faq#should-i-check-my-node-modules-folder-into-git node_modules
And here's a different one:
> less LemonStand.gitignore # add content_*.php if you don't want erase client changes to content
I'd really like to understand the reason why people add this rule, and what benefits it gives me. But that's missing - merged with the classic "No description provided" several years ago. Sigh.
Anyway, it'd be nice to capture some details about a rule change - to help everyone review and understanding things better. What if we had a meta-format for these rules?
This is current in the "back-of-the-napkin" stage of thinking, but what a potential spec might look like:
> less framework/Node.gitignoretemplate Dependencies: notes: node_modules contains other dependencies related to your package, and there's other infrastructure that takes care of restoring these and locking specific versions link: https://docs.npmjs.com/misc/faq#should-i-check-my-node-modules-folder-into-git rules: - node_modules
There's some extra details here which are invaluable to the process:
- better organization of templates (we could do
project/to namespace away more specialized templates, rather than a dumping ground of things)
- without needing to refer back to the PR, details about the change are present
- external links encourage projects to provide supporting material
- support for making localizable documentation
This could be compiled to:
# Dependencies node_modules
Or you could go for a more verbose format:
# node_modules contains other dependencies related to your package, and # there's other infrastructure that takes care of restoring these and # locking specific versions # more info: https://docs.npmjs.com/misc/faq#should-i-check-my-node-modules-folder-into-git node_modules
Essentially, this format might seem like more work for all involved, but having a consistent format for data and details means that knowledge is centralized, discoverable and easier to disseminate.
- your feedback, give it to me
- review more templates and sketch out a proper spec
- talk to some contacts about the github/gitignore repo to gauge interest
- poke around the gitignore.io repo to see if they have a need for this