-
Notifications
You must be signed in to change notification settings - Fork 82.7k
Add .gitignore for Astro #4829
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add .gitignore for Astro #4829
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,49 @@ | ||||||||||||
| node_modules/ | ||||||||||||
| /triage/ | ||||||||||||
| /.compiler/ | ||||||||||||
|
Comment on lines
+2
to
+3
|
||||||||||||
| /triage/ | |
| /.compiler/ |
Copilot
AI
Mar 29, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These patterns (scripts/..., benchmark/..., test-results/) look specific to Astro’s own repository/test setup rather than a consumer Astro application. To keep this template broadly applicable (per repo README guidance on scope), drop repo-internal paths and keep only ignores that are commonly produced by Astro projects.
| scripts/smoke/*-main/ | |
| scripts/memory/project/src/pages/ | |
| benchmark/projects/ | |
| benchmark/results/ | |
| test-results/ |
Copilot
AI
Mar 29, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ignoring package-lock.json by default is risky for typical Astro apps because lockfiles are commonly committed to ensure reproducible installs in CI and across developers. Unless Astro explicitly recommends ignoring lockfiles for end-user projects, this line should be removed (or at least scoped to the monorepo use case rather than a generic template).
| package-lock.json |
Copilot
AI
Mar 29, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.claude isn’t a standard Astro-generated file/directory and doesn’t appear in any other template in this repo. Including tool-specific config like this in a general Astro template will surprise users and can hide intentionally committed configuration; it should be removed from the template.
| .claude |
Copilot
AI
Mar 29, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
*.env will ignore all env files, including commonly-committed examples like .env.example. Other templates in this repo typically add an allowlist exception (e.g., !.env.example) or use more targeted patterns. Consider aligning with that approach so projects can keep sample env files under version control.
| *.env | |
| *.env | |
| !.env.example |
Copilot
AI
Mar 29, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The packages/... and examples/... ignore patterns are tied to Astro’s monorepo layout and are unlikely to apply to typical Astro projects. In a generic Astro template, these broad paths can accidentally match legitimate user directories named packages/examples and hide tracked files. Recommend removing these repo-specific entries and keeping only project-generated artifacts (e.g., .astro/, dist/, logs).
| examples/**/env.d.ts |
Copilot
AI
Mar 29, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This ignore rule targets an extremely specific file path inside Astro’s own e2e fixtures (packages/astro/e2e/fixtures/...) and doesn’t belong in a general-purpose Astro project template. Keeping such a specific path in a public template adds noise and can confuse consumers; please remove it.
| packages/astro/e2e/fixtures/cloudflare/.wrangler/deploy/config.json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This template file is named
Astrowithout the.gitignoresuffix, which is inconsistent with the rest of this repository’s templates (e.g.,Nextjs.gitignore,Angular.gitignore). This likely prevents it from being discovered/used by template tooling and by GitHub’s template chooser. Rename the file toAstro.gitignore.