Rsync includes a nifty option --cvs-exclude to “ignore files in the same way CVS does”, but CVS has been obsolete for years. Is there any way to make it also ex
--cvs-exclude
Check out the MERGE-FILES FILTER RULES section in rsync(1).
It looks like it's possible to create a rsync --filter rule that will include .gitignore files as traverses the directory structure.