将特征分支上游设置为自动上游?

发布于 2025-02-01 05:21:19 字数 649 浏览 3 评论 0原文

很多时候,我会检查一个分支,然后我将做一个git拉检查事物。然后,我将邀请一条消息,这样

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> feature-branch-111

我通常会执行后一个选项,看起来像

git分支-set-upstream-to = origin/firmit-branch-111 feature-branch-branch-11

在此时,我可以做一个git拉,并且可以正常工作。

但是我对每个分支机构都厌倦了这样做。有没有办法让git假设分支是同一名称?还是另一种使它更容易的方法?

Many times at work I'll check out a branch and then i'll do a git pull to check things. I'll then be promped with a message like so

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> feature-branch-111

I then usually do the latter option which looks like

git branch --set-upstream-to=origin/feature-branch-111 feature-branch-111

at which time I can do a git pull and it works.

But I get tired of doing this with each and every branch. Is there a way to have git just assume the branches are the same name? or maybe another way to make this easier?

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

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

发布评论

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