Skip to content

Instantly share code, notes, and snippets.

@romines
Created July 13, 2015 22:25
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 romines/d4ad1efc30d3eeb82f47 to your computer and use it in GitHub Desktop.
Save romines/d4ad1efc30d3eeb82f47 to your computer and use it in GitHub Desktop.
WordPress .gitignore
# -----------------------------------------------------------------
# .gitignore for WordPress
# Bare Minimum Git
# http://ironco.de/bare-minimum-git/
# ver 20150227
#
# This file is tailored for a WordPress project
# using the default directory structure
#
# This file specifies intentionally untracked files to ignore
# http://git-scm.com/docs/gitignore
#
# NOTES:
# The purpose of gitignore files is to ensure that certain files not
# tracked by Git remain untracked.
#
# To ignore uncommitted changes in a file that is already tracked,
# use `git update-index --assume-unchanged`.
#
# To stop tracking a file that is currently tracked,
# use `git rm --cached`
#
#
# -----------------------------------------------------------------
# ignore everything in the root except the "wp-content" directory.
/*
!wp-content/
# ignore all files starting with .
.*
# track this file .gitignore (i.e. do NOT ignore it)
!.gitignore
# track .editorconfig file (i.e. do NOT ignore it)
!.editorconfig
# 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
# ignore log files and databases
*.log
*.sql
*.sqlite
# ignore compiled files
*.com
*.class
*.dll
*.exe
*.o
*.so
# ignore packaged files
*.7z
*.dmg
*.gz
*.iso
*.jar
*.rar
*.tar
*.zip
# ignore everything in the "wp-content" directory, except:
# "mu-plugins" directory
# certain "plugins"
# "themes" directory
wp-content/*
!wp-content/mu-plugins/
!wp-content/themes/
# track these plugins
#!wp-content/plugins/advanced-custom-fields/
wp-content/themes/index.php
# ignore contents of build folder
wp-content/themes/fredfifteen/public/*
# except track images dir
!wp-content/themes/fredfifteen/public/images
# ignore stock themes
wp-content/themes/twenty*/
# ignore node/gulp dependency directories
wp-content/themes/fredfifteen/node_modules/
# ignore unbuilt bower stuff
wp-content/themes/fredfifteen/src/vendor/*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment