Manual:$wgGitInfoCacheDirectory

Details
Directory where will look for pre-computed cache files. If false, the local directory of the MediaWiki component that is being checked for will be used.

It's used to cache git information from MediaWiki core and extensions on Special:Version, if MediaWiki or extensions have been downloaded from git.