Refactoring CreateTestRepository

Now each git command is a function