Reputation: 1802
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
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
Reputation: 1045
In Stash (2.10), go to the Branches view. You can select Delete from the Actions button
Upvotes: 24
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