Skip to content

Instantly share code, notes, and snippets.

@mishterk
Last active January 20, 2022 22:05
Show Gist options
  • Save mishterk/2b7fe119d7ac5f951274382b3bdeaa81 to your computer and use it in GitHub Desktop.
Save mishterk/2b7fe119d7ac5f951274382b3bdeaa81 to your computer and use it in GitHub Desktop.
This is a boilerplate for a .gitignore file when tracking at the WordPress wp-content directory level. It allows tracking of custom plugins and themes whilst ignoring everything else.
.DS_Store
.sass-cache
node_modules
/upgrade
/cache
/uploads
/advanced-cache.php
/debug.log
/languages
/db.php
/wflogs
# Ignore anything within themes, except the theme we are building.
/themes/*
!/myproject-theme
# Ignore anything within plugins. Exceptions to this to follow.
/plugins/*
# Track any plugins prefixed with myproject-
!/plugins/myproject-*
# Track any other plugins we control
!/plugins/some-custom-plugin
!/plugins/some-modified-third-party-plugin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment