getGitInfo function

Get git repository information for a script