Add torch.version.git_version (#18299)
Summary:
Fixes: https://github.com/pytorch/pytorch/issues/18293
cc: colesbury
Pull Request resolved: https://github.com/pytorch/pytorch/pull/18299
Differential Revision: D14611972
Pulled By: soumith
fbshipit-source-id: cdb48ef37c8869713a9a43ea0da08e1bed9279a2