Sync files between two different folders on a single Mac
If the git solution does not work for you Linux has you covered. 

For folder syncing use rsync -avP —delete —exclude=‘excludeDir’ /path/source /path/dest
or 
mirror
And for automatic operation use the scheduler crontab