delete branch locally and remote code example
Example 1: delete branch from remote
// delete branch locally
git branch -d localBranchName
//delete local branch that is unmerged
git branch -D localBranchName
// delete branch remotely
git push origin --delete remoteBranchName
Example 2: delete branch git
//delete locally
git branch -d branch_name
//delete remotely
//git push <remote_name> :<branch_name>
// ex. git push origin :serverfix
Example 3: remove branch git
// 1. delete branch locally
git branch -d localBranchName
// 2. delete branch remotely
git push origin --delete remoteBranchName
// 3. DONE!
Example 4: git delete remote branches in local git
git fetch --all --prune
Example 5: How to Delete Local/Remote Git Branches
$ git branch -a
$ git push origin --delete b1
Example 6: delete local and remote branch github
git branch -d branch_namegit branch -D branch_name