Skip to content

Instantly share code, notes, and snippets.

@joebillings
Created November 27, 2019 10:40
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 joebillings/940bf31d68837a6411244be7cb289343 to your computer and use it in GitHub Desktop.
Save joebillings/940bf31d68837a6411244be7cb289343 to your computer and use it in GitHub Desktop.
One .gitignore
# Ignore everything #
**
!wp-content/
wp-content/**
!wp-content/themes/
!wp-content/plugins/
wp-content/themes/**
wp-content/plugins/**
# Add two rules for each Theme or Plugin you want to include:
# 1. !folder-name/ <-- includes the Plugin and top level files
# 2. !folder-name/** <-- includes the Plugin and sub level files recursively, except for the "Ignore some other system generated files" rules below
###############################
# Start editing!
# Theme
!wp-content/themes/theme-name
!wp-content/themes/theme-name/**
# Functionality Plugin
!wp-content/plugins/core-functionality/
!wp-content/plugins/core-functionality/**
# Stop editing!
############################################
# Ignore some other system generated files #
############################################
*.com
*.class
*.dll
*.exe
*.o
*.so
*.7z
*.dmg
*.gz
*.iso
*.jar
*.rar
*.tar
*.log
*.sql
*.sqlite
.DS_Store
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db
.codekit-cache
.sass-cache
node_modules
# Sublime
*.sublime-project
*.sublime-workspace
# PhpStorm
.idea/
# Always include the build script #
###################################
!build.sh
!README.md
!CHANGELOG.md
!.gitignore
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment