如何从bitbucket中删除git远程分支?

发布于 2024-12-14 03:16:04 字数 572 浏览 3 评论 0原文

我尝试通过 git push 命令删除 bitbucket 上的 git 远程分支:

qty:workspace qrtt1$ git push origin :my_branch
remote: fatal: bad object 0000000000000000000000000000000000000000
remote: bb/acl: qrtt1 is allowed. accepted payload.
remote: fatal: bad object 0000000000000000000000000000000000000000
To [email protected]:qrtt1/workspace.git
 - [deleted]         my_branch

但是,仅删除了本地存储中的分支。我该如何删除它?

附言。我可以用同样的方式从 github 中删除远程分支。

I try to remove the git remote branch on the bitbucket by git push command:

qty:workspace qrtt1$ git push origin :my_branch
remote: fatal: bad object 0000000000000000000000000000000000000000
remote: bb/acl: qrtt1 is allowed. accepted payload.
remote: fatal: bad object 0000000000000000000000000000000000000000
To [email protected]:qrtt1/workspace.git
 - [deleted]         my_branch

However, only the branch in my local stroage removed. How do I remove it ?

PS. I can remove the remote branch in the same way from github.

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

乄_柒ぐ汐 2024-12-21 03:16:04

如果某个分支被设置为主分支,则您无法从 Bitbucket 中删除该分支。您需要进入 Bitbucket 存储库的管理部分,并为主分支选择不同的分支。然后您应该能够使用远程分支

git push <repository> :<branch>

You can't delete a branch from Bitbucket if that branch is set as the Main Branch. You need to go into the Admin section of your Bitbucket repository and select a different branch for the Main Branch. You should then be able to remote the branch using

git push <repository> :<branch>
凤舞天涯 2024-12-21 03:16:04

尽管它显示了这些错误/警告(可能是 BitBucket 的某些 post hook 不正确?),但它已经继续删除了 my_branch 分支,如最后一行所示。转到 Web UI 并确认分支确实消失了。

Eventhough, it says those errors / warnings (probably some post hook that BitBucket has that is not proper?), it has gone ahead and deleted the my_branch branch, as indicated by the last line. Go to the web UI and confirm that the branch is indeed gone.

つ低調成傷 2024-12-21 03:16:04

我发现同样的问题,只删除了本地,没有删除远程。
最后我从 http://groups.google.com/group/gitorious 找到了解决方案/browse_thread/thread/5afe8581cdd96d2b,只需使用

git push <repository> :<branch>

后在bitbucket网站上检查,它应该消失了。

I found the same problem, only the local is removed but not remote.
Finally I found the solution from http://groups.google.com/group/gitorious/browse_thread/thread/5afe8581cdd96d2b, just use

git push <repository> :<branch>

After that checked on bitbucket website, it should be gone.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文