delete branche git 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: 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: git effacer banch
git branch -d<branchname>
Example 4: remove branch git
// 1. delete branch locally
git branch -d localBranchName
// 2. delete branch remotely
git push origin --delete remoteBranchName
// 3. DONE!
Example 5: git supprimer branche origin
git push origin --delete branch_name
Example 6: 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