1、修改远程仓库地址 git remote set-url origin 远程仓库url 2、查看是否修改成功 git remote -v 3、上传代码 分支名不一定是master,根据git里写的来定。 git push -u origin master