.GitInfo out of scope in shortcode

Yes

Shortcodes have access to parameters delimited in the shortcode declaration via .Get, page- and site-level variables, and also the following shortcode-specific fields

So a shortcode has no access to .File, .Hugo, .Menu, .GitInfo, .Sitemap variables …

I tried to pass some context to the shortcode
You can only pass strings as parameters…