Extract git code into a separate module