Skip to content

Instantly share code, notes, and snippets.

@wetory
Last active November 29, 2022 22:24
Show Gist options
  • Save wetory/d9afbfb6680ad37ac4a3844410b9087d to your computer and use it in GitHub Desktop.
Save wetory/d9afbfb6680ad37ac4a3844410b9087d to your computer and use it in GitHub Desktop.
Example of .gitignore file for WordPress based project.
### 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