I think this thread answers a decent number of questions beginners have relating to how Ghost plays into static sites:
However, to explicitly answer your question, the things you need to upload to git are the tools necessary to pull data from Ghost and any other sources and generate static assets (html, css, javascript, images, etc.). This can be as simple as a shell script that downloads every file, or as complex as a static site generator like Gatsby.