- Delete all local branchs except
master
anddevelop
git branch | grep -v "master\|develop" | xargs git branch -D
-
Delete local refs to deleted remote branchs.
-
Verify branchs
git branch -a
-
Delete refs
git remote prune origin
-
Verify
git branch -a
-