使用 QtCreator 和 Git (GitHub) 时分支名称不匹配

问题描述 投票:0回答:0

我已经开始将我的项目从手动更改记录系统转移到 git 环境中进行版本控制。

我已经设置了一个 GitHub 帐户,将存储库克隆到我的本地计算机并开始工作。我已经设置了本地和远程分支,就像从我的 QtCreator IDE 中获取的图像一样:

我已将 GitHub 中的开发分支设置为默认分支,以下是我在 GitHub 上的分支:

我已经成功提交了几次,并通过右键单击“开发”分支并选择推送来使用推送命令,如下所示:

问题是,当我输入命令 git push 时,我收到此警告:

fatal: The upstream branch of your current branch does not match
the name of your current branch.  To push to the upstream branch
on the remote, use

    git push . HEAD:main

To push to the branch of the same name on the remote, use

    git push . HEAD

To choose either option permanently, see push.default in 'git help config'.

To avoid automatically configuring an upstream branch when its name
won't match the local branch, see option 'simple' of branch.autoSetupMerge
in 'git help config'.

我不太确定这告诉我什么。有人可以帮助我并指导我找到解决方案吗?我读过“起源”“主要”“头部”的定义,但它们并没有让事情变得更清楚。

谢谢!

git github version-control qt-creator
© www.soinside.com 2019 - 2024. All rights reserved.