how to delete branch locally and remotely code example
Example 1: delete a branch in git
// delete branch locally
git branch -d localBranchName
// delete branch remotely
git push origin --delete remoteBranchName
Example 2: git delete branch
git branch -d feature/login
git push origin --delete feature/login
git branch -d feature/login && git push origin --delete feature/login
Example 3: delete a branch git
// delete branch locally
git branch -d localBranchName
// delete branch remotely
git push origin --delete remoteBranchName
// delete branch locally
git branch -d localBranchName
// delete branch remotely
git push origin --delete remoteBranchName
// refresh branch list
git fetch -p
Example 4: How do I delete a Git branch locally and remotely?
$ git push -d <remote_name> <branch_name>
$ git branch -d <branch_name>
Example 5: git delete branch start with
git branch -d $(git branch | grep yourSearchPattern)
Example 6: How to Delete Local/Remote Git Branches
$ git branch -a
$ git push origin --delete b1