解决方法: 进入到.git/refs/remotes 目录下,删除错误分支对应的文件名称。 git fetch --all --prune git branch --set-upstream-to=origin/xxx xxx