无法 git 拉入新分支

Cannot git pull in a new branch

我正在处理同事创建的新分支。我已经提交了所有更改,当我尝试 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暗示的那样,做:

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

假设您的同事创建了 kiet_tnp 分支,他s/she 要求您拉取。