Praveen
Praveen

Reputation: 1802

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?

Upvotes: 29

Views: 45221

Answers (4)

Moumit
Moumit

Reputation: 9630

Branches view -> Delete(select from options)

enter image description here

Upvotes: 16

Praveen
Praveen

Reputation: 1802

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.

Upvotes: 40

wreckgar23
wreckgar23

Reputation: 1045

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

Upvotes: 24

danio
danio

Reputation: 8653

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)

Upvotes: 5

Related Questions