如何从bitbucket中删除git远程分支?
我尝试通过 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如果某个分支被设置为主分支,则您无法从 Bitbucket 中删除该分支。您需要进入 Bitbucket 存储库的管理部分,并为主分支选择不同的分支。然后您应该能够使用远程分支
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
尽管它显示了这些错误/警告(可能是 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.我发现同样的问题,只删除了本地,没有删除远程。
最后我从 http://groups.google.com/group/gitorious 找到了解决方案/browse_thread/thread/5afe8581cdd96d2b,只需使用
后在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
After that checked on bitbucket website, it should be gone.