Skip to content

Instantly share code, notes, and snippets.

@macmladen
Last active August 29, 2015 14:16
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 macmladen/9b3ca2c310852782ba5d to your computer and use it in GitHub Desktop.
Save macmladen/9b3ca2c310852782ba5d to your computer and use it in GitHub Desktop.
.exclude.rsync used to hold exclude for rsyncing Drupal site local <-> live, used shell syntax for highlighting
# Rsync EXCLUDE configuration to user@server.com:public_html
# test drive, remove n to actually sync
# I - ignore time, c - checksum, grep to exclude unchanged files
# rsync -aniIc --exclude-from=.exclude.rsync ./ user@server.com:public_html/ | grep -v "^\."
# Not needed on live:
.git*
sites/all/drush
.exclude.rsync
# Leave this on live
.usermin
# Development modules, not needed on live
sites/all/modules/hacked
sites/all/modules/stage_file_proxy
# GITIGNOREd: paste whole .gitingore file below
# ===========
# Ignore configuration files that may contain sensitive information.
sites/*/settings*.php
# Ignore paths that contain user-generated content.
sites/*/files
sites/*/private
# Ignore .htaccess
# changed for server security, Options +SymLinksifOwnerMatch
#.htaccess
#.htpasswd
#htusers
# Ignore backups and archives
*~
*bak
*.sql
*.tar
*.gz
*.tgz
# Ignore Compass temp & devel files
.sass-cache
*.css.map
# Ignore CSS files - generate them
sites/all/themes/*/css/
# IDE files
.buildpath
.project
.settings
.metadata
.cache
.idea
*.sublime-*
*.esproj
.directory
# Ignore CTags
.tags*
# Mac OS X specific files
.DS_Store
._*
.AppleDouble
.LSOverride
Icon
# Files that might appear on external disk
.Spotlight-V100
.Trashes
# Thumbnails
Thumbs.db
# Server files
awstats-icon
awstatsicons
icon
# Dev
FirePHPCore
# Modules and themes used for testing or dev.
sites/all/modules/contrib/styleguide/
sites/all/modules/contrib/seo_checklist/
sites/all/modules/contrib/checklistapi/
sites/all/modules/contrib/examples/
# Syntax helper
#
# / this is not actually a root but base of rsync
# /dir/ means exclude the root folder /dir
# /dir/* means get the root folder /dir but not the contents
# dir/ means exclude any folder anywhere where the name contains dir/
# Examples excluded: /dir/, /usr/share/mydir/, /var/spool/dir/
# /dir means exclude any folder anywhere where the name contains /dir
# Examples excluded: /dir/, /usr/share/directory/, /var/spool/dir/
# /var/spool/lpd//cf means skip files that start with cf within any folder within /var/spool/lpd
#
# Prefix line with + or minus to include and/or exclude
# - /dir exclude root dir
# + /dir/IneedThis.txt include this one file
#
# Wildcarding:
# '*' matches any non-empty path component (it stops at slashes).
# '**' to match anything, including slashes.
# '?' matches any character except a slash (/).
# '[' introduces a character class, such as [a-z] or [[:alpha:]].
# in a wildcard pattern, a backslash can be used to escape a wildcard character, but it is matched literally when no wildcards are present.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment