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
You can use git ls-files to build the list of files excluded by the repository's .gitignore files.
https://git-scm.com/docs/git-ls-files
Options:
--exclude-standard Consider all .gitignore files.-o Don't ignore unstaged changes.-i Only output ignored files.--directory Only output the directory path if the entire directory is ignored.The only thing I left to ignore was .git.
rsync -azP --exclude=.git --exclude=`git -C ls-files --exclude-standard -oi --directory`