1、进入项目终端或者idea的Terminal查看代码已绑定的git仓库地址
git remote -v
2、删除本地关联的git仓库地址
git remote rm origin
3、本地代码关联新的仓库地址
git remote add origin 新地址
4、再次查看本地代码关联的git仓库地址是否正确
git remote -v
5、确认无误后即可再次提交和推送代码到代码仓库啦
git pull 报错:There is no tracking information for the current branch.
git pull 报错:There is no tracking information for the current branch.-CSDN博客
git 拉取远程时报如下错误:
There is no tracking information for the current branch.
Please specify which branch you want to merge with.
问题描述:提示branch没有跟踪信息
解决方案
1.直接指定远程分支
git pull origin master
2.先指定本地master到远程的master,然后再去pull
git branch --set-upstream-to=origin/master master
git pull
我的本地分支名称为master,远程分支名称也是master。
--------------------------------------------------------------------------------------------------------
我本地分支名称ruoyiPlus,远程分支也是ruoyiPlus
切换到本地分支ruoyiPlus
git checkout ruoyiPlus
拉取远程ruoyiPlus
分支的最新变更: 在确保没有冲突的情况下,使用git pull
命令从远程仓库拉取最新的变更
-
设置本地分支追踪远程分支: 如果之前没有设置过追踪关系,可以使用以下命令进行设置:
git branch --set-upstream-to=origin/ruoyiPlus ruoyiPlus
拉取
git pull
但是,通常在执行git pull
时,如果本地分支已经设置了追踪远程分支,那么这个步骤会被自动完成。所以,如果你已经设置过追踪关系,只需要执行git pull origin ruoyiPlus
即可。
git pull origin ruoyiPlus