move git related functions to git_tools