refactor git scripts