【问题标题】:Cannot git pull in a new branch不能 git pull 一个新的分支
【发布时间】:2016-03-30 04:05:08
【问题描述】:

我正在开发一个同事创建的新分支。我已经提交了所有更改,当我尝试git pull 时,它给了我一个错误:

$ git pull
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=origin/<branch> kiet_tnp
$

我该怎么办?没有git pull,我无法推送我的代码。

【问题讨论】:

标签: git github git-branch git-pull


【解决方案1】:

就像 git 暗示的那样,做:

git branch --set-upstream-to=origin/kiet_tnp kiet_tnp
git pull

假设你的同事创建了他/她要求你拉的 kiet_tnp 分支。

【讨论】:

  • 太棒了。谢谢你:)
  • 收到一些答案后,请随时接受任何已接受的答案来结束您的问题
猜你喜欢
  • 2013-09-30
  • 2018-01-03
  • 2015-09-23
  • 2016-03-24
  • 1970-01-01
  • 2021-09-02
  • 2013-03-05
  • 2012-12-03
相关资源
最近更新 更多