We have a known issue with auto-export generating incorrect order-before statements for content (not for config). This is a super tricky thing to get right (and sometimes impossible), because it’s essentially a 3-way diff with one source unknown. In almost every case, the order of content nodes doesn’t actually matter in practice, with a notable exception being HST site menu nodes. If this is the case for you, you will see warnings like this:
My recommendation would be to adjust your log4j config to ignore these warnings in development, but also take special care to review HST site menu nodes before committing to your source control.
As for duplicate UUIDs, this is a much less common problem and likely to be sensitive to the specific conditions of your project. Often this is caused by copy-paste of an existing YAML file that contains UUIDs, since duplicates are unlikely to occur at random. You might consider bulk-removing the jcr:uuid property from the relevant YAML files, unless you actually reference nodes by ID, e.g. in a hippo:docbase property elsewhere. Since references to UUIDs that have been duplicated are ambiguous by nature, an automated fix cannot be guaranteed to be correct – you’ll have to check and fix any such references yourself using context.
You can also use the /hippo:configuration/hippo:modules/autoexport/hippo:moduleconfig/autoexport:filteruuidpaths property to suppress the export of UUIDs in the first place. This won’t help you if UUIDs have already been copy-pasted, though.
As for your direct question, the answer depends on if you’re referring to HCM “config” or “content”. Content is always fully re-exported, replacing the entire YAML source file, whenever any change is made to a node within the source file or any ancestor node. The order-before problem is likely to recur, though, since it was caused by a known bug.
Config is only updated incrementally, adding or rewriting individual properties as they change or appending child nodes as they are added. Since there’s no (official) way to change a node’s UUID, auto-export would never rewrite this specific property for a node managed as config.