Skip to content

Instantly share code, notes, and snippets.

@ianpegg
Last active July 20, 2024 13:17
Show Gist options
  • Save ianpegg/e0d7b13b120e916c9ace2bba1baa1a11 to your computer and use it in GitHub Desktop.
Save ianpegg/e0d7b13b120e916c9ace2bba1baa1a11 to your computer and use it in GitHub Desktop.
.gitignore for LAMP / cPanel
# -----------------------------------------------------------------
# .gitignore for LAMP / cPanel
#
# This file specifies intentionally untracked files to ignore
# http://git-scm.com/docs/gitignore
#
# NOTES:
# The purpose of gitignore files is to ensure that certain files not
# tracked by Git remain untracked.
#
# 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`
#
# -----------------------------------------------------------------
# Always-ignore extensions #
############################
.env
.env.*
!.env.example
*.err
*.orig
~*
**/*~
**/*.bak
**/*.sw[abcdefghijklmnop]
**/*.vi
# Dependency Management #
#########################
.composer/
*.css.map
.CVS
.gemrc
node_modules/
.rvmrc
*.sass-cache
vendor
# Version Control #
#########################
*.diff
.gitconfig
.hg
*.rej
.svn
# Workspace Configurations #
############################
*.code-workspace
*.esproj
*.komodoproject
.komodotools
.idea
nbproject
.project
.settings
*.sublime-project
*.sublime-workspace
.tmproj
# cPanel environment #
######################
.accesshash
.bash_*
.bashrc
.cagefs/
.cl.selector/
.clamavconnector.status
.config/
.contactemail
.cpanel/
.ftpquota
.gnupg/
.lastlogin
.lesshst
.local/
.myimunify_id
.pearrc
.razor/
.spamassassin/
.spamassassinboxenable
.spamassassinenable
.ssh/
.trash
.viminfo
.well-known/
.wp-toolkit-identifier
.zshrc
cpanelbranding/
etc/
lscache/
lscmData/
mail/
php/
ssl/
var/
www
# Apache Configuration #
########################
# Ignore root-level .htaccess, which is server-specific
/.htaccess
.htaccess.bk
.htaccess_lscachebak_*
.htpasswds/
.user.ini
# Logs / Temporary #
####################
/logs/*
!/logs/wflogs/
/logs/wflogs/*
/tmp/*
access-logs
error_log
*.log
**/*.log
# Databases #
#############
.mysql_history
#*.sql # Using Git to backup MySQL dumps
*.sqlite
# OS generated files #
######################
.cache
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
desktop.ini
ehthumbs.db
Thumbs.db
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
############
# it's better to unpack these files and commit the raw source
# git has its own built in compression methods
*.7z
*.dmg
*.gz
*.iso
*.jar
*.rar
*.tar
*.zip
# Video files #
###############
*.wmv
*.mpg
*.mpeg
*.mp4
*.mov
*.flv
*.avi
*.ogv
*.ogg
*.webm
# Audio files #
###############
*.wav
*.mp3
*.wma
# Generic folders #
###################
/backup/
/old/
/private/
/trash/
# Generic excludes #
####################
!.gitkeep
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment