refactored the git stuff into a separate module so its easier to reuse in other plugins