Answers for "how to locally delete branch git"


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 remoteBranchName
Posted by: Guest on April-07-2020

delete branch git

//delete locally
git branch -d branch_name

//delete remotely
//git push <remote_name> :<branch_name>
// ex. git push origin :serverfix
Posted by: Guest on May-25-2020

How to Delete Local/Remote Git Branches

$ git branch -r | egrep -v -f /dev/fd/0  <(git branch -vv | grep origin) | xargs git branch -d
Posted by: Guest on August-21-2020

Code answers related to "how to locally delete branch git"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language