rsync -avm --include=".gitignore" --include='*/' --exclude='*' /source/ /target/
Example for all rar files
lake@M5273296:/mnt/c/work/temp$ rsync -avm --include="*.rar" --include='*/' --exclude='*' "source/" /mnt/d/