git pull 时 出现 There is no tracking information for the current branch

2019-09-23 18:29:32 +08:00
 vanishxiaoma

There is no tracking information for the current branch. Please specify which branch you want to merge with. See git-pull(1) for details.

git pull <remote> <branch>

If you wish to set tracking information for this branch you can do so with:

git branch --set-upstream-to=<remote>/<branch> xxxx

执行命令 git branch --set-upstream-to=origin/xxxx xxxx

fatal: Not tracking: ambiguous information for ref refs/remotes/origin/xxxx

没有成功 有遇到过这种问题的吗

3575 次点击
所在节点    git
5 条回复
0bject
2019-09-23 18:40:08 +08:00
远程分支还在吗
vanishxiaoma
2019-09-23 18:40:52 +08:00
@0bject 在的直接通过命令
git pull origin 是可以拉去的
ayonel
2019-09-23 18:45:12 +08:00
提示里面不是写的很清楚了么。。git branch --set-upstream-to=<remote>/<branch> xxxx
vanishxiaoma
2019-09-23 18:46:24 +08:00
@ayonel 执行命令
git branch --set-upstream-to=origin/xxxx xxxx
提示
fatal: Not tracking: ambiguous information for ref refs/remotes/origin/xxxx
ayonel
2019-09-23 18:49:59 +08:00
如果不需要本地分支的话,
1.git brach -d xxxx 将本地分支删除
2.git checkout remotes/origin/xxxx
3. git pull
4. git checkout -b xxxx

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/603457

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX