No tracked branch configured for branch xxx or the branch doesn‘t exist. To make your branch track

问题

IDEA中用Git拉取代码报:No tracked branch configured for branch FyuTA or the branch doesn't exist. To make your branch track a remote branch call, for example:

解决办法

1.先在项目目录下打开Git Bash Here

 2.执行git init

git init

3.执行​git remote add origin https://gitee.com/xxx.git

git remote add origin https://gitee.com/xxx.git

(注:将https://后面部分的地址换成自己远程仓库的地址)

 4.执行​git pull

git pull

5.执行git branch --set-upstream-to=origin/FyuTA FyuTA

git branch --set-upstream-to=origin/FyuTA FyuTA

注:(不一定要跟IDEA的提示写的一模一样!”origin/”后面的第一个名称指的是你要拉取哪个远程分支上面的代码,第二个指的是你要将远程的代码拉取到本地哪个分支上面)

 6.重新去IDEA拉取代码

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值