【问题标题】:Git Extensions - pushing to a non master remote branchGit 扩展 - 推送到非主远程分支
【发布时间】:2026-02-14 12:00:02
【问题描述】:

使用 v2.49 Git 版本 2.10.1

在以下情况下,我在推送对话框中遇到问题:

  • 远程存储库有 2 个分支,“master”和“otherBranch”
  • 克隆本地存储库并签出“otherBranch”分支。
  • 创建一个名为“myBranch”的新分支并检查它。
  • 更改文件,暂存并提交我的更改。
  • 尝试将“myBranch”推送到远程“otherBranch”,但推送对话框仅显示“master”和“myBranch”作为“要推送到的分支”的选项(缺少“otherBranch”选项)。

Git 扩展视图知道 otherBranch(我可以看到从 master 分支到 origin/otherBranch 分支)。 还尝试了 git fetch 和 pull 但一切都是最新的。

现在,当使用 Linux GIT 命令行时,“git push”在这个特定场景(“git push origin myBranch:otherBranch”)上正常工作,所以就像 git extensions 没有正确获取远程分支列表一样。 我错过了什么?

感谢您的帮助

【问题讨论】:

  • 也许 Git 扩展不知道otherBranch 分支存在于远程。如果是这样,那么做一个git fetch 可能会解决这个问题。
  • 感谢蒂姆的评论,添加了一些新信息。

标签: git git-extensions


【解决方案1】:

这是 GitExtensions 中的一个错误。 https://github.com/gitextensions/gitextensions/commit/8d9560230041f27ecf72255a542e095532be722a 该补丁将包含在 2.50 版本中。

【讨论】: