![]() # !wp-content/plugins/my-directory-plugin/ # !wp-content/plugins/my-single-file-plugin.php # specify (see the commented-out examples for hints on how to do this.) # Ignore everything in the "plugins" directory, except the plugins you # Ignore everything in the "wp-content" directory, except the "plugins" # Ignore everything in the root except the "wp-content" directory. Or see git's documentation for more info on. # See the comments below for more info on how to add exceptions for your # themes, and other directories that should be under version control. # also the WordPress root directory) and add exceptions for any plugins, # Solution: stick this file up your repository root (which it assumes is # configuration files etc., in your project's repository. # Fact: you don't want WordPress core files, or your server-specific gitignore file for git-managed WordPress projects. ![]() A better approach is as follows from here: # This is a template. I tried the above and they didn't work so well. NOTE: I tried using double-wildcard 'globs' but according to this that functionality is system dependent and it didn't work on my mac: How-do-gitignore-exclusion-rules-actually-work How-do-negated-patterns-work-in-gitignore If someone cares to offer a more informed explanation by all means. So if I have subdirectories 5 deep under themes, I still need to spell that out. ![]() Notice how you have to explicitly allow content for each level you want to include. Here's how I did it - you essentially have to walk up the paths, you can't wildcard more than one level in any direction: # Ignore everything: ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |