Skip to content

Instantly share code, notes, and snippets.

@wetory
Last active November 29, 2022 22:23
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 wetory/5944cd8640676c00769f82a1d065f13f to your computer and use it in GitHub Desktop.
Save wetory/5944cd8640676c00769f82a1d065f13f to your computer and use it in GitHub Desktop.
My universal .gitignore for WordPress projects
### NetBeans ###
**/nbproject/private/
**/nbproject/Makefile-*.mk
**/nbproject/Package-*.bash
build/
nbbuild/
dist/
nbdist/
.nb-gradle/
### VisualStudioCode ###
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
!.vscode/*.code-snippets
# Local History for Visual Studio Code
.history/
# Built Visual Studio Code Extensions
*.vsix
### VisualStudioCode Patch ###
# Ignore all local history of files
.history
.ionide
# Support for Project snippet scope
### WordPress ###
# ignore everything in the root except the "wp-content" directory and "wp-config" file(s)
/*
!wp-content/
!wp-config*
# include ".htaccess" file
!.htaccess
# include custom maintenance page content
!wp-content/maintenance.php
!wp-content/maintenance/
# ignore everything in the "wp-content" directory, except:
# "themes" directory
wp-content/*
!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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment