Answers for "remove deleted branches from local git"

167

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
3

delete local branches not on remote

git branch -vv | grep ': gone]'|  grep -v "\*" | awk '{ print $1; }' | xargs -r git branch -D
Posted by: Guest on May-06-2020

Code answers related to "remove deleted branches from local git"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language