exit with error if git fails