git branch -a
# *master
# test
# remote/origin/master
# remote/origin/test
git branch -d test
# Deleted branch test (was ########).
git branch -a
# *master
# test
# remote/origin/master
# remote/origin/test
git push origin --delete test
# To <URL of your repository>.git
# - [deleted] test
https://www.hostinger.com/tutorials/how-to-rename-a-git-branch/