extract function to install git