Break git commands into a module.

There was no needs for it to all be in the same file.