Deploy data files only to new website with rsync [solved]

I wanted to copy everything from my git repo to production except images and media. This tutorial helped me out. This command will copy all js, php, html, and css files and directory structure without copying images or other media:

rsync -av --include='*/' --include='*.php' --include='*.html' --include='*.js' --include='*.css' --exclude='*' source/ destination/

This will work in linux, unix, or os x.

Trackback this Post | Feed on comments to this Post

Leave a Reply

You must be logged in to post a comment.