refactoring some git functions