git pull 出现问题

发布于 2024-10-19 04:12:10 字数 843 浏览 1 评论 0原文

我在使用 git 时遇到问题。

我分支了一个存储库并编写了一些代码。

我的朋友克隆了它,做了一些更改,然后 push --all 到服务器。

我现在想通过 pull 查看这些更改,但我收到以下消息:

You asked me to pull without telling me which branch you
want to merge with, and 'branch.branchName.merge' in
your configuration file does not tell me, either. Please
specify which branch you want to use on the command line and
try again (e.g. 'git pull <repository> <refspec>').
See git-pull(1) for details.

If you often merge with the same branch, you may want to
use something like the following in your configuration file:

    [branch "threshold"]
    remote = <nickname>
    merge = <remote-ref>

    [remote "<nickname>"]
    url = <url>
    fetch = <refspec>

See git-config(1) for details.

我在这里做错了什么?

I'm having trouble using git.

I branched a repo and wrote some code.

My friend cloned that, made some changes, and push --all to the server.

I now want to see those changes with pull, but I'm getting the following message:

You asked me to pull without telling me which branch you
want to merge with, and 'branch.branchName.merge' in
your configuration file does not tell me, either. Please
specify which branch you want to use on the command line and
try again (e.g. 'git pull <repository> <refspec>').
See git-pull(1) for details.

If you often merge with the same branch, you may want to
use something like the following in your configuration file:

    [branch "threshold"]
    remote = <nickname>
    merge = <remote-ref>

    [remote "<nickname>"]
    url = <url>
    fetch = <refspec>

See git-config(1) for details.

What am I doing wrong here?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文