Refactoring common git related code into new class and refactor tests:benchmark related code.