Can't answer the question about Git, but aren't you hitting a nail with a sledgehammer by reinstalling DA on servers just for a hostname change?
I've changed hostnames before and it was simply change the hostname in /etc/hostname and /etc/hosts followed by the hostname in the Admin settings in DA. you may also have hostname in local/directadmin/custombuild/options.conf (redirect_host="hostname"). Once done, add the FQDN A record for the server's new hostname in your domain's DNS, reissue the TLS certificate and that should be it. Probably a lot quicker than a reinstall and rebuild.
I get your point but for me backup and reinstall is just two clicks.
I have completely automated the installer and thus do not need to do anything.
And with the risk of forgetting something, it is just easier for me to reinstall.