move git functions into single file