fix git provider checkout of a remote ref on an existing repo