delete local branch
// delete branch locally
git branch -d localBranchName
//delete local branch that is unmerged
git branch -D localBranchName
// delete branch remotely
git push origin --delete remoteBranchNamedelete local branch
// delete branch locally
git branch -d localBranchName
//delete local branch that is unmerged
git branch -D localBranchName
// delete branch remotely
git push origin --delete remoteBranchNameremove local branch
git branch -d branch_namegit branch -D branch_nameHow to Delete Local/Remote Git Branches
$ git branch -r | egrep -v -f /dev/fd/0  <(git branch -vv | grep origin) | xargs git branch -dgit delete local branch
$ git for-each-ref --format '%(refname:short) %(upstream:track)' |
  awk '$2 == "[gone]" {print $1}' |
  xargs -r git branch -D
Deleted branch fix-typo (was 7b57d4f).
Deleted branch grammar-fix (was 01257bd).Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us
