Well, why not using a local Git? I understand it isn't an internal IDE functionality, but it is free and widely used for almost any language/environment, together with Explorer integration to make it easier to use (e.g. I used TortoiseGit).
PS: Apart from that, I think Arduino IDE programmers could/should integrate GIT, like Visual Studio did since 2019, so the commands commit/push/pull/etc could be activated from the IDE itself. It'd be a nice feature.