fix git refresh and chmod on empty list