Unison 2.51.2 that has been released in January 2018 has a new feature that is very useful for synchronizing, for example, '.git' directories:
> Add a new preference, 'atomic', for specifying directories that should > be treated atomically. It would be great to see this in Debian soon!