删除Bitbucket中的分支 [英] Delete branches in Bitbucket

查看:1438
本文介绍了删除Bitbucket中的分支的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我们的一个仓库中创建了很多分支机构。这些分支在被拉到主人面前进行测试。现在我在列表中看到很多,他们我们将永远不会再使用它。如何将这些分支直接删除到Bitbucket?

I've created lots of branches in one of our repositories. Those branches are for testing before it will be pulled to the master. Now I see lots of them on the list and they we will never use it again. How to delete those branches directly to Bitbucket?

推荐答案

如果分支只是本地的,可以使用 -d 如果分支已被合并,如

If the branches are only local, you can use -d if the branch has been merged, like

git branch -d branch-name

如果分支包含您从未计划合并的代码,请改用 -D

If the branch contains code you never plan on merging, use -D instead.

如果分支位于上游回购库中(在Bitbucket上),您可以通过

If the branch is in the upstream repo (on Bitbucket) you can remove the remote reference by

git push origin :branch-name

另外,如果你在Bitbucket网站上,你可以通过访问网站上的提交下的功能分行标签来移除您推送的分行。你会找到一个省略号图标。点击该按钮,然后选择删除分支

Also, if you're on the Bitbucket website, you can remove branches you've pushed by going to the Feature branches tab under Commits on the site. There you'll find an ellipsis icon. Click that, then choose Delete branch. Just be sure you want to drop all the changes there!

这篇关于删除Bitbucket中的分支的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆