Feature: Add support for .gitignore parsing and system file whitelisting
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
Research direction
Start by tracing the push scan and checkout/seed flow described in the issue, then inspect how repository files are currently selected and exported. Verify behavior against the listed acceptance criteria: nested .gitignore patterns and negations exclude matching files, while .gitignore, AGENTS.md, and CLAUDE.md remain preserved; confirm the rules also survive checkout/seed.
Written by the indexing model from the issue text.
Description
Summary
I was trying to use Obsidian to edit Markdown files, and faced a problem to sync the Obsidian vault .obsidian.. Because it does not exist on the server. While one could use the Gutenberg Guidelines structure for brand voice and other items, it would be useful to allow people to keep other files in their checked out repos and only push what Push MD supports.
Since Push MD does not have a .gitignore, this can cause ignored build artifacts or temporary files to be scanned and pushed into WordPress - and the whole push to fail.
The proposal:
Push MD checkout repositories can contain .gitignore file. And the rules here will specifically check for file paths Push MD needs, and ignore everything else.
This can also address potential issues when people have multi remote setup - one from local to their own "staging" or "pre-approval" Git server, and from there to live WordPress site.
Features & How This Should Work
-
.gitignorePattern Parser:- Interpret root and sub-folder
.gitignorefiles during push scan. - Support standard pattern syntax: wildcards (
*), directory prefixes (/), comments (#), trailing slashes, and negations (!).
- Interpret root and sub-folder
-
System File Whitelist Policy:
- System configuration files (
.gitignore,AGENTS.md,CLAUDE.md) should be explicitly whitelisted so they are preserved and never ignored, even if broad rules (like.*or*.md) exist in.gitignore. - Support for posts, pages and other artifacts in a way that support for custom post types etc in future works too
- System configuration files (
-
Seeder Integration:
- Export
.gitignoreduring checkout/seed so workspace rules remain intact.
- Export
Acceptance Criteria
-
.gitignorepatterns correctly exclude matching files during push scan. - Negation rules (
!pattern) work as expected. - System files (
.gitignore,AGENTS.md,CLAUDE.md- and others) are explicitly whitelisted and never ignored.
- Dominant language
- PHP
- Stars
- 22
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Automattic/php-toolkit
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Automattic/php-toolkit#89 ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
Automattic/php-toolkit#102 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 76/100
Automattic/php-toolkit#95 ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
Automattic/php-toolkit#91 ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
Automattic/php-toolkit#87 ·
All issues in Automattic/php-toolkit
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
hector-jewell/food-delivery-system-for-restaurant-using-php#1311 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Sylius/SyliusGridBundle#501 ·