Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

Default .gitignore file

# -----------------------------------------------------------------
# .gitignore for WordPress @salcode
# ver 20180808
#
# From the root of your project run
# curl -O https://gist.githubusercontent.com/salcode/b515f520d3f8207ecd04/raw/.gitignore
# to download this file
#
# By default all files are ignored.  You'll need to whitelist
# any mu-plugins, plugins, or themes 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
#
# Change Log:
# 20180808 unignore site.webmanifest
# 20180714 unignore .phpcs.xml.dist
# 20160309 Added favicon files as whitelisted files
# 20150302 Added composer.json as a whitelisted file
# 20150227 Created as fork of https://gist.github.com/salcode/9940509,
#   this version ignores all files by default
# -----------------------------------------------------------------

# ignore everything in the root except the "wp-content" directory.
/*
!wp-content/

# ignore everything in the "wp-content" directory, except:
# mu-plugins, plugins, and themes directories
wp-content/*
!wp-content/mu-plugins/
!wp-content/plugins/
!wp-content/themes/

# ignore all mu-plugins, plugins, and themes
# unless explicitly whitelisted at the end of this file
wp-content/mu-plugins/*
wp-content/plugins/*
wp-content/themes/*

# ignore all files starting with . or ~
.*
~*

# ignore node dependency directories (used by grunt)
node_modules/

# ignore OS generated files
ehthumbs.db
Thumbs.db

# ignore Editor files
*.sublime-project
*.sublime-workspace
*.komodoproject

# ignore log files and databases
*.log
*.sql
*.sqlite

# ignore compiled files
*.com
*.class
*.dll
*.exe
*.o
*.so

# ignore packaged files
*.7z
*.dmg
*.gz
*.iso
*.jar
*.rar
*.tar
*.zip

# -------------------------
# BEGIN Whitelisted Files
# -------------------------

# track these files, if they exist
!.gitignore
!.editorconfig
!.phpcs.xml.dist
!README.md
!CHANGELOG.md
!composer.json

# track favicon files, if they exist
!android-chrome-*.png
!apple-touch-icon*.png
!browserconfig.xml
!favicon*.png
!favicon*.ico
!manifest.json
!mstile-*.png
!safari-pinned-tab.svg
!site.webmanifest

# track these mu-plugins, plugins, and themes
# add your own entries here
!wp-content/mu-plugins/example-mu-plugin/
!wp-content/plugins/example-plugin/
!wp-content/themes/example-theme/
Comment

where should gitignore file be

Put .gitignore in the working directory. It doesn't work if you put it in the .git (repository) directory
$ ls -1d .git*
.git
.gitignore
Comment

PREVIOUS NEXT
Code Example
Shell :: conda update with environment from yml file 
Shell :: powershell add line to beginning of file 
Shell :: compile electron app 
Shell :: install ghost script 
Shell :: remote add to github 
Shell :: howto register dll windows 10 
Shell :: how to run a .sh file 
Shell :: how to edit crontab macos 
Shell :: install blender on Debian Linux 
Shell :: zip files linux 
Shell :: How do i search for available packages from the command-line 
Shell :: git diff between one file 
Shell :: how to install docker compose on windows 
Shell :: secure shell 
Shell :: termux update 
Shell :: git edit user of last commit 
Shell :: speedtest linux 
Shell :: git log files only 
Shell :: pip install django invalid syntax 
Shell :: ssh into directory 
Shell :: grep word after match 
Shell :: linux unique lines 
Shell :: make zip file command 
Shell :: bash print a blank line 
Shell :: how to install windows sdk 
Shell :: docker build requires exactly 1 argument 
Shell :: installing flutter_native_splash 
Shell :: linux find md5 checksum 
Shell :: make vscode git mergetool 
Shell :: Start MySQL FreeBSD 
ADD CONTENT
Topic
Content
Source link
Name
1+7 =