【问题标题】:Locally deleted branch is not deleted on remote repository [duplicate]远程存储库上未删除本地删除的分支[重复]
【发布时间】:2016-04-24 23:08:26
【问题描述】:

在与主节点合并后,我删除了一个分支。但是,本地删除的分支不会在远程仓库(在 github 上)上删除。

根据此处的一个答案中的建议,我尝试了git push remote :branch,但这似乎没有帮助。 --prune 选项似乎也没有帮助。我想我也可以继续远程删除分支,但我不想检查它并跟踪每个分支。

有什么想法吗?

【问题讨论】:

标签: git github repository branch


【解决方案1】:

你想用这个...

git push remote --delete <branch-name>

虽然git push remote :branch 应该有效。该命令说在没有本地集的情况下推送这个分支,有效地删除它

你确定你的遥控器的名字是remote吗?会不会是起源?使用git remote -v 列出您的遥控器。

做不到这一点,you can delete branches using GitHub's UI

【讨论】:

  • 你用远程分支的名称替换 branch 吗?
  • 是的,当然。但是没有用。
猜你喜欢
  • 2018-09-29
  • 2016-07-08
  • 2020-11-18
  • 2014-09-03
  • 2021-08-22
  • 2015-05-12
  • 2013-02-21
  • 2021-12-11
  • 2021-06-25
相关资源
最近更新 更多