Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot get rsync to ignore my git folder and my todo file

Tags:

rsync

I'm uploading a web page to my server and I simply want the rsync to ignore 3 things: The .git/ folder, my .gitignore file and my TODO. I have tried serveral formats. My latest command being:

rsync -avz --include "*" --exclude .git/ --exclude .gitignore --exclude TODO --del ariela@pc01:/home/web/taskadmin /home/web/tests/

However the all the unwanted files are still being copied. I don't understand. What am I doing wrong?

like image 543
aarelovich Avatar asked Oct 15 '14 10:10

aarelovich


1 Answers

All files are included by default. Simply exclude those you don't want to be copied

rsync -avz --exclude .git/ --exclude .gitignore --exclude TODO --del ariela@pc01:/home/web/taskadmin /home/web/tests/
like image 149
Raul Andres Avatar answered Oct 23 '22 22:10

Raul Andres