By default, rsync will only copy files and directories, but not remove them from the destination copy when they are removed from the source. To keep the copies exact, include the --delete flag:
rsync -ave ssh --delete dev/ hack:"/root/dev"
The following command has the same effect.
rsync -ave ssh --delete dev hack:"/root"
--exclude-excluded is also related to deleting on the receiving side.
rsync -ave ssh --delete dev/ hack:"/root/dev"
The following command has the same effect.
rsync -ave ssh --delete dev hack:"/root"
--exclude-excluded is also related to deleting on the receiving side.