Skip to content
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

[WordPress] updated ignored list #2972

Merged

Conversation

@rohanvakharia
Copy link
Contributor

@rohanvakharia rohanvakharia commented Feb 24, 2019

Reasons for making this change:

To ignore everything except the plugins and theme

Links to documentation supporting these rule changes:

https://core.trac.wordpress.org/browser/trunk/.gitignore

If this is a new template:

https://wordpress.org

@shiftkey shiftkey changed the title Updated ignored list [WordPress] updated ignored list Mar 8, 2019
Copy link

@malithmcr malithmcr left a comment

Some Wordpress themes use node inside theme folder but not in the root.

WordPress.gitignore Show resolved Hide resolved
Copy link
Contributor Author

@rohanvakharia rohanvakharia left a comment

Updated.

WordPress.gitignore Show resolved Hide resolved
@shiftkey
Copy link
Member

@shiftkey shiftkey commented May 12, 2019

@rohanvakharia thanks!

@shiftkey shiftkey merged commit 445fddf into github:master May 12, 2019
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Ortega-Dan added a commit to Ortega-Dan/gitignore that referenced this pull request Jun 26, 2019
@kolorafa
Copy link

@kolorafa kolorafa commented Aug 27, 2019

How does those rules ignore all files in root directory?

# ignore everything in the root except the "wp-content" directory.
!wp-content/

Isn't there something missing like /* ?
Current (after merge) gitignore includes wp-config:

$ git add . --dry-run|grep wp-config
add 'wp-config-sample.php'
add 'wp-config.php'
@hdwebpros
Copy link

@hdwebpros hdwebpros commented Sep 11, 2019

I'm not sure why this PR was merged. It's confusing.

If I see # ignore everything in the root except the "wp-content" directory. then I shouldn't see # ignore log files and databases since those are in the root.

Also, like @kolorafa mentioned, it seems that there is something missing. We've used:

# Ignore everything, but all to descend into subdirectories
*
!*/

To ignore everything, but allow the including of what you want included. So, you could have

# "themes/my-theme" directory
!wp-content/themes/my-theme/**

Later in your gitignore file and have that work fine.

@pedrosanta
Copy link

@pedrosanta pedrosanta commented Jan 21, 2020

It's just me or this merge is a utter and complete trainwreck? I've got all seed projects broken, basically allowing me to add/stage pretty much of a complete WP install into the commit.

This wasn't nowhere near as tested by the submitter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

6 participants