Update WordPress.gitignore #3282
Conversation
Hello all and thanks to create great file. There is problem to find proper meaning of content for this file in this repo. My propose need review as I have different, more direct approach with fix expectation. 1. Header to know what rules are used and be apply to project after using template. Errors can be removed, updates won't be broken and clearly show why I using that file. Right now, any changes are confused. This file many people use many times. 2. Introduce link to Github where template is created. Like a template, this can be modified so no big deal. Used as link where to watch. For this pull request nobody will update their gitignore file just because that link don't preexist from copy & paste. I see that some files have it so suggestion welcome. 3. Core Files need to be *ignored* (clue from comment) but there was broken part: Solution apply and work (thx. @stkrzysiak) : https://github.com/github/gitignore/pull/3093/files/1115dec039582df7242acd588811357f76d610ce#diff-f2cf96854b528e9828c4ca34a4917e54 Otherwise, all root catalog was added ;/ If core file need to be *included*, then we need fix other parts as : - /wp-content/language - /wp-content/index.php (security bug when someone use apache listings) 4. Thanks @chougran #3125 This is most important as gitignore provide solution to sensitive credentials. Comments appreciate :)
Core file that was introduced to block listing. They are traced by Wordpress developers and are part of package
Adding "/*" introduce bug where self (Wordpress.gitignore or .gitignore) file isn't added to git. This file is part of project that downloaded, will guard other people to upload improper files.
| node_modules/ | ||
|
|
||
| # ignore log files and databases | ||
| # Log files and databases | ||
| *.log | ||
| *.sql |
pedrosanta
Jan 22, 2020
Why are we ignoring .sql files? Do they naturally come/are generated on a typical WordPress installation? Aren't we over-assuming this?
Why are we ignoring .sql files? Do they naturally come/are generated on a typical WordPress installation? Aren't we over-assuming this?
Triloworld
Jan 22, 2020
Author
Wordpress require SQL database. I don't find that they pre-exist on first installation.
Remove it? I don't see value to have it in this ignore file template
Wordpress require SQL database. I don't find that they pre-exist on first installation.
Remove it? I don't see value to have it in this ignore file template
pedrosanta
Jan 23, 2020
Yes, I think the *.sql and *.sqlite rules should be removed. I know some people might have them as part of their workflows, but I see this gitignore repository more as base/starter gitignore files, that can be mixed together (like using gitignore.io)
I see these files only containing (1) the specific files for each technology/tool and (2) and possibly rules for widely common configurations of such technologies/tools (ex: *.log line).
Also, they shouldn't have redundant lines that are covered by other specific gitignores (ex: Global/macOS.gitignore).
Project/workflow specific rules should be added/maintained individually on each project, IMHO.
Yes, I think the *.sql and *.sqlite rules should be removed. I know some people might have them as part of their workflows, but I see this gitignore repository more as base/starter gitignore files, that can be mixed together (like using gitignore.io)
I see these files only containing (1) the specific files for each technology/tool and (2) and possibly rules for widely common configurations of such technologies/tools (ex: *.log line).
Also, they shouldn't have redundant lines that are covered by other specific gitignores (ex: Global/macOS.gitignore).
Project/workflow specific rules should be added/maintained individually on each project, IMHO.
pedrosanta
Jan 23, 2020
Btw, added my own contribution addressing the above and more on #3295.
Btw, added my own contribution addressing the above and more on #3295.
|
Closing this out in favour of #3295 which seems to most detailed discussion |
|
Why part of solution was rejected when really it was accepted? |
|
I propose fix to pull request:
|
|
@Triloworld I'm not opposed to interim fixes while #3295 goes on, it just wasn't clear to me whether this PR was active based on the discussion.
Please open up PRs for these changes, as they feel like they are a step in the right direction. |
Hello all and thanks to create great file.
There is problem to find proper meaning of content for this file in this repo.
My propose need review as I have different, more direct approach with fix expectation.
Header. To know what rules are used, and be apply to project after using template. Errors can be removed, updates won't be broken and clearly show why I using that file.
Now: Any changes are confused.
After: Rules are in header
Introduce link to Github where template is created. Like a template, this can be modified so no big deal. Used as link where to watch. For this pull request nobody will update their gitignore file just because that link don't preexist from copy & paste.
Now: Manually fixing and no connection to place where file come from.
After: Can be used to update if some bugs will be introduce.
Core Files need to be ignored (clue from comment) but there was broken part:
Solution apply and work (thx. @stkrzysiak) : https://github.com/github/gitignore/pull/3093/files/1115dec039582df7242acd588811357f76d610ce#diff-f2cf96854b528e9828c4ca34a4917e54
Now: All root catalog was added ;/
After: Just some will be excluded
If core file need to be included, then we need fix other parts as and new pull request:
Thanks @chougran
#3125
This is most important as gitignore provide solution to sensitive credentials.
Now: wp-config leak
After: Configuration is safe :)
License
As they can be manually edited for adding more software (bundle of license) then is out of scope for ignoring it in this particular template. Rule is to add wordpress context stuff that are repeated every new repository is created. Maybe add clue that need to be handled manually? or just header that Wordpress use particular one.
It is tested on: WP 5.3.2
Used: Custom theme + custom plugin (they language are ignore but can be download from dashboard)
Comments appreciate as my first post here :)