fix git pull without branch bug