I am using rsync to copy a subset of git files to a trimmed repository. I have added the --delete option documented here: https://superuser.com/a/
rsync
--delete