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?


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?