Article 5H6SP rsync created a bunch of empty directories even though I specifically only transferred

rsync created a bunch of empty directories even though I specifically only transferred

by
salilsurendran
from LinuxQuestions.org on (#5H6SP)
I used this command on my mac terminal to only to sync only java files whose size had changed on the remote host:

rsync -rP --size-only --include="/" --include=".java" --exclude="*" /src/dir1/ remote-host:/src/dir1/

However, there were several .git/objects/??/ directories in my source folder but it had no java files in it.

for eg.

ls .git/objects/e3 4704650cf08c9d36c8e6699cf08b6e672e532b <= file but not java

On the remote host it created the exact same .git/objects/e3 folder but completely empty. How do I prevent this?latest?d=yIl2AUoC8zA latest?i=9R7eO7aQXjA:yQDO9fXq8pQ:F7zBnMy latest?i=9R7eO7aQXjA:yQDO9fXq8pQ:V_sGLiP latest?d=qj6IDK7rITs latest?i=9R7eO7aQXjA:yQDO9fXq8pQ:gIN9vFw9R7eO7aQXjA
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments