Skip to content

Instantly share code, notes, and snippets.

@sewmyheadon
Forked from salcode/.gitignore
Last active October 18, 2016 21:14
Show Gist options
  • Save sewmyheadon/602783e61a8f50e2fda9cffdd447fa2e to your computer and use it in GitHub Desktop.
Save sewmyheadon/602783e61a8f50e2fda9cffdd447fa2e to your computer and use it in GitHub Desktop.
.gitignore for WordPress
# -----------------------------------------------------------------
# .gitignore for WordPress ver 20161009
# -----------------------------------------------------------------
#
# This file:
# • is for WordPress sites using the default file/folder structure,
# • specifies which files are tracked/untracked by git.
#
# .gitignore docs:
# https://git-scm.com/docs/gitignore
#
# To ignore uncommitted changes in a tracked file,
# use `git update-index --assume-unchanged`.
#
# To stop tracking a file,
# use `git rm --cached`
#
# Forked from Bare Minimum Git:
# https://ironcodestudio.com/bare-minimum-git/
#
# Change Log:
# 20161009 Cosmetic and docs changes
# 20160927 Initial fork from Bare Minimum Git repo
#
# -----------------------------------------------------------------
# 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
# ignore Editor files
*.sublime-project
*.sublime-workspace
*.komodoproject
# ignore log files and databases
*.log
*.sql
*.sqlite
error_log
php_errorlog
# 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
# "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/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment