Skip to content

[FEATURE] set up gitignore for deployed files #990

@petemounce

Description

@petemounce

Is your feature request related to a problem? Please describe.
When apm install is run, it delivers content into the working tree. This can then be accidentally committed to source control in the scenario where apm is not being used as a vendoring-code tool.

Describe the solution you'd like
apm.yml can have a top-level mode parameter, taking values default or vendor. The former behaves as now plus additively starts to also maintain .gitignore entries for the content that is being managed by apm. The latter does not maintain .gitignore entries.

The repo-root .gitignore is tempting but would grow large and as that is usually a hand-maintained file, that would complicate maintainers' UX. If this is accepted I'd propose either

  1. {target-root}/.gitignore
  2. {target-root}/{content-type}/.gitignore

... as both are more likely to be hands-off files. (1) might be problematic as for example .claude/settings.json or .opencode/opencode.json live within, so there's possibility of human/machine toe-stomping.

Describe alternatives you've considered
I think the ideal would be gitignore having an include directive that would allow apm to have its own file but sadly that's not a feature gitignore has.

I thought also about deploying symlinks aimed into apm_modules - but those would still ideally be gitignored, so discarded it.

Additional context

n/a

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/docs-sitedocs/src/content (Starlight), README, doc generation.area/package-authoringapm pack/unpack, plugin authoring, vendoring guidance, bundle format.status/needs-designDirection approved, design discussion required before code.status/triagedInitial agentic triage complete; pending maintainer ratification (silence = approval).theme/portabilityOne manifest, every target. Multi-target deploy, marketplace, packaging, install.type/featureNew capability, new flag, new primitive.

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions