how to remove a branch in git only on locally code example Example: git delete branch start with git branch -d $(git branch | grep yourSearchPattern)