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?
To delete a remote branch, you can't use the git branch command. Instead, use the git push command with --delete flag, followed by the name of the branch you want to delete. You also need to specify the remote name ( origin in this case) after git push .
It is safe to delete your local branch after you pushed your changes to your own remote repository. The pull request is unrelated to this, because it is simply a request to the maintainers of the original repository to merge your changes back into their code base.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With