refactor(git): extract git cmd in own function