I am using rsync
to deploy a git branch with my production server. Currently, I got js
files stored in two locations:
When I run rsync using --exclude js
, non of the both folders will be sync, while I want the assets/js/
folder to be synced and the js/
folder inside my root folder to be skipped. How can I achieve this?
You need to specify the pattern for those files and directories:
using:
CWRULE [PATTERN_OR_FILENAME]
CWRULE,MODIFIERS [PATTERN_OR_FILENAME]
so you would have something like
CW- js/
For even more detailed info you can see the man page at the section
Include/Exclude Pattern Rules
from this link, hope it helps
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments