Created
April 23, 2020 07:51
-
-
Save SpiZeak/1a0e195cbd179735fbd230c26c50ce09 to your computer and use it in GitHub Desktop.
.gitignore for WordPress
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
# ----------------------------------------------------------------- | |
# .gitignore for WordPress | |
# | |
# Author: Max Trewhitt <max@trewhitt.se> | |
# Version 2020-04-23 | |
# | |
# By default all files are ignored in the root directory. You'll need to whitelist | |
# any files you want to include in the repo. | |
# | |
# 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 this .gitignore file and the README as well as the "wp-content" directory. | |
/* | |
!.gitignore | |
!readme.md | |
!wp-content/ | |
# ignore everything in the "wp-content" directory, except: | |
# "mu-plugins", "languages", "plugins" and "themes" directory | |
wp-content/* | |
!wp-content/mu-plugins/ | |
!wp-content/languages | |
!wp-content/plugins/ | |
!wp-content/themes/ | |
# ignore these plugins | |
wp-content/plugins/hello.php | |
# ignore specific themes | |
wp-content/themes/twenty*/ | |
# ignore node dependency directories | |
node_modules/ | |
# ignore log files and databases | |
*.log | |
*.sql | |
*.sqlite | |
# ignore packaged files | |
*.7z | |
*.dmg | |
*.gz | |
*.iso | |
*.jar | |
*.rar | |
*.tar | |
*.zip |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment