Created
April 17, 2017 05:42
-
-
Save nickdavis/18c89dc79289380990eeeb36f314a07e to your computer and use it in GitHub Desktop.
Starter .gitignore for new WordPress projects (based on https://www.billerickson.net/code/sample-gitignore/)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Ignore everything # | |
** | |
!vendor/ | |
vendor/** | |
!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! | |
# Libraries (to be moved to standalone packages later) | |
!vendor/library-name/ | |
!vendor/library-name/** | |
# Theme | |
!wp-content/themes/theme-name/ | |
!wp-content/themes/theme-name/** | |
# Functionality Plugins | |
!wp-content/plugins/plugin-name/ | |
!wp-content/plugins/plugin-name/** | |
# Add submodules (optional) | |
!.gitmodules | |
# Stop editing! | |
############################################ | |
# Ignore some other system generated files # | |
############################################ | |
*.com | |
*.class | |
*.dll | |
*.exe | |
*.o | |
*.so | |
*.7z | |
*.dmg | |
*.gz | |
*.iso | |
*.jar | |
*.mp4 | |
*.rar | |
*.tar | |
*.log | |
*.sql | |
*.sqlite | |
*.webm | |
.DS_Store | |
._* | |
.Spotlight-V100 | |
.Trashes | |
bower_components | |
config.codekit | |
ehthumbs.db | |
node_modules | |
Thumbs.db | |
.codekit-cache | |
.sass-cache | |
# PhpStorm | |
.idea/ | |
# Sublime | |
*.sublime-project | |
*.sublime-workspace | |
# Always include the build script # | |
################################### | |
!build.sh | |
!README.md | |
!CHANGELOG.md |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment