Can't get rsync to ignore my git folder and my todo file

I am uploading a webpage to my server and I just want rsync to ignore 3 things: .git / folder, my .gitignore file and my TODO. I tried server formats. My last command:

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

However, all junk files are still copied. I do not understand. What am I doing wrong?

+6
source share
1 answer

All files are included by default. Just exclude the ones you do not want to copy

 rsync -avz --exclude .git/ --exclude .gitignore --exclude TODO --del ariela@pc01 :/home/web/taskadmin /home/web/tests/ 
+7
source

Source: https://habr.com/ru/post/976773/


All Articles