Skip to content

Instantly share code, notes, and snippets.

@anthonydelgado
Last active December 26, 2016 23:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anthonydelgado/ae596bed9fbdd356393163bc5a73bc08 to your computer and use it in GitHub Desktop.
Save anthonydelgado/ae596bed9fbdd356393163bc5a73bc08 to your computer and use it in GitHub Desktop.
.gitignore for WordPress
# -----------------------------------------------------------------
# .gitignore for WordPress
# Bare Minimum Git
#
# NOTES:
# The purpose of gitignore files is to ensure that certain files not
# tracked by Git remain untracked.
#
# -----------------------------------------------------------------
# ignore everything in the root except the "wp-content" directory.
/*
!wp-content/
!favicon.ico
!wp-config.php
# track this file .gitignore (i.e. do NOT ignore it)
!.gitignore
# track readme.md in the root (i.e. do NOT ignore it)
!readme.md
# ignore all files that start with ~
~*
# ignore OS generated files
ehthumbs.db
Thumbs.db
.DS_Store
# ignore Editor files
*.sublime-project
*.sublime-workspace
*.komodoproject
.idea
# ignore everything in the "wp-content" directory, except:
# "mu-plugins" directory
# "plugins" directory
# "themes" directory
wp-content/*
!wp-content/mu-plugins/
!wp-content/plugins/
!wp-content/themes/
# ignore these plugins
wp-content/plugins/hello.php
# ignore specific themes
wp-content/themes/twenty*/
# ignore node/grunt dependency directories
node_modules/
ignoring-files
bower_components
node_modules
npm-debug.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment