简体   繁体   中英

How to remove branch from a remote (on Atlassian Stash/Bitbucket)

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?

What I know is git branch –D prod-652 deletes the branch from local. How can I delete it from Atlassian Stash?

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.

In Stash (2.10), go to the Branches view. You can select Delete from the Actions button

Branches view -> Delete(select from options)

在此输入图像描述

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 )

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM