With a kernel based rootkit, git would never see the hidden files or would see a pristine version of the file.
I've encountered this before on pentests. Not only was it easy to subvert, when I popped the version control server I got access to the data of a dozen or so other servers.