git 如何从远程删除分支(在 Atlassian Stash/Bitbucket 上)
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/19358162/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to remove branch from a remote (on Atlassian Stash/Bitbucket)
提问by Praveen
I want to delete a branch from Atlassian Stash (a sort of github clone) in order to revert my changes. Please let me know what command will do this?
我想从 Atlassian Stash(一种 github 克隆)中删除一个分支以恢复我的更改。请让我知道什么命令可以做到这一点?
What I know is git branch –D prod-652
deletes the branch from local. How can I delete it from Atlassian Stash?
我所知道的是git branch –D prod-652
从本地删除分支。如何从 Atlassian Stash 中删除它?
回答by Praveen
Here are the commands:
以下是命令:
git branch –D branch-name (delete from local)
git push origin :branch-name (delete from stash)
Note the colon (:) in the last command.
请注意最后一个命令中的冒号 (:)。
回答by wreckgar23
In Stash (2.10), go to the Branches view. You can select Delete from the Actions button
在 Stash (2.10) 中,转到 Branches 视图。您可以从“操作”按钮中选择“删除”
回答by danio
If you have installed Atlassian SourceTree(Windows/Mac only) on your client machine you can do it from there by right clicking on the remote branch and choosing delete. (Under the hood it does the same commands as Praveen's answer)
如果您已在客户端计算机上安装了Atlassian SourceTree(仅限 Windows/Mac),您可以通过右键单击远程分支并选择删除来执行此操作。(在引擎盖下,它执行与Praveen 的回答相同的命令)